syntax highlighter doesn't detect new line

Issue I’m using this plugin to highlight textarea : http://www.jqueryscript.net/text/jQuery-Based-Text-Highlighter-For-Textarea.html $(‘textarea’).textareaHighlighter({ matches: [ { ‘match’: [‘hello’,’dear’,’this is a test’, ‘text to match’], // will check for this matches ‘matchClass’: ‘match’ // on matched text this class will be added }

Continue reading

How to highlight an HTML table column without using loops?

Issue I have a table like this: <table> <thead> <tr> <th id=”col-1″><input type=”button” class=”some” value=”Company” /></th> <th>name</th> <th>Adress</th> <th>Zip</th> <th>Place</th> <th>Country</th> </tr> </thead> <tbody> <tr class=”even”> <td headers=”col-1″>Some ltd</td> <td>some name</td> <td>some street</td> <td>some zip</td> <td>some town</td> <td>some country</td> </tr>

Continue reading

Webpack adding jQuery plugin: Error: jQuery requires a window with a document

Issue I’m using Angular 4 +webpack.I’ve added a jQuery plugin to nonTreeShakableModules const in webpack.config.vendor.js: const path = require(‘path’); const webpack = require(‘webpack’); const ExtractTextPlugin = require(‘extract-text-webpack-plugin’); const merge = require(‘webpack-merge’); const treeShakableModules = [ ‘@angular/animations’, ‘@angular/common’, ‘@angular/compiler’, ‘@angular/core’, ‘@angular/forms’,

Continue reading

John Resigs micro templating engine, question of how to handle selects?

Issue I’ve a template that looks like so: <script type=”text/html” id=”TemplateEdit”> <td> <input type=”hidden” value=”<#= item.ID #>” id=”Edit.ID” name=”Edit.ID” /> <select id=”Edit_ClientID” name=”Edit.ClientID”> <option value=”1″>test</option> <option value=”2″>test 2</option> <option value=”3″>test 3</option> </select> </td> <td> <select id=”Edit_Frequency” name=”Edit.Frequency”> <option value=”1″>Daily</option> <option

Continue reading

JQuery Pure Template

Issue I cant figure out whats wrong. Its working when i tried to refresh only topics but it doesnt works when tried to refresh topics and page-links. ie. topics table’s refreshing, and ‘pagelinks’ disappearing, i thought pure cannot reach –

Continue reading

Need to match <template>(anything)</template>

Issue Here’s the problem, The match must not also match (anything) (anything), only the first set. Here’s jsFiddle where I’ve been trouble shooting this. http://jsfiddle.net/UFTR2/ var templates = ‘<template mini-dash-ytd>’+ ‘<span class=”mini-dash-title”>{{title}}</span>’+ ‘<span class=”mini-dash-metric”>{{value}}</span>’+ ‘</template>’+ ‘<template mini-dash-yesterday>’+ ‘<span class=”mini-dash-title”>{{title}}</span>’+ ‘<span

Continue reading

Handlebars dynamic field names

Issue I’m working with Handlebars in a Meteor app and want to do the following: I have a database with data about recurring payments. Here’s my markup for displaying the next payment details: {{#each Customers}} <tr> <td id=”{{nextpayment}}”>{{nextpayment}}</td> <td>{{name}}</td> <td>{{subscription_amount}}</td>

Continue reading

Looping through an array of json objects

Issue So, I have this web app in which I am using hbs as the templating engine. Now, from my rest API I am sending over an array of JSON objects: [{“;_id”:”5704630a7d4cd367f8dsdce7″,”name”:”Seagate”,”description”:”This awesome Hard disk” ,”categories”:[“SDD”,”256GB”]}] I have a variable:

Continue reading

try to load base64 img into a canvas

Issue i’m currently trying to load a base64 img into my canvas console.log(‘Change’); var canvas = document.getElementById(‘canvas’); var ctx = canvas.getContext(‘2d’); var image = new Image(); image.onload = function() { ctx.drawImage(image, 0, 0); }; image.src = stack[1].save; stack[1].save contains a

Continue reading

Jquery Star Rating Plugin – Half star Not Working

Issue I am implementing jquery star rating plugin. a single star imputing is workign fine, no problem. But i cant seem to get half a star working… html source: <div class=”stars”> <span class=”star-rating-control”><div class=”rating-cancel” style=”display: none;”><a title=”Cancel Rating”></a></div><div role=”text” aria-label=””

Continue reading

jquery star rating plugin and jquery click function

Issue I’m using the jquery star rating plugin: http://www.fyneworks.com/jquery/star-rating/ I might get some html code like this: <form name=”api-disable”> <input type=”radio” class=”star {split:2}” name=”api-readonly-test” value=”1″/> <input type=”radio” class=”star {split:2}” name=”api-readonly-test” value=”2″/> <input type=”radio” class=”star {split:2}” name=”api-readonly-test” value=”3″/> <input type=”radio” class=”star

Continue reading

jquery star rating not working in table

Issue I have a table. I tried adding one column for rating. The problem is that all the stars are coming at the same cell. Here is my JSP code <tbody> <c:forEach var=”history” items=”${history}” varStatus=”loopCounter”> <c:forEach var=”child” items=”${history.child}” varStatus=”loopCounter2″> <tr>

Continue reading

Bootstrap star-rating shown two times

Issue I am using this plugin to show star rating on my Bootstrap website. Here is part of the modal code in which I put the star rating (see the input element): <div class=”modal-header”> <button type=”button” class=”close” data-dismiss=”modal” aria-label=”Close”><span aria-hidden=”true”>&times;</span></button>

Continue reading

Tooltip not shown when input class is rating

Issue Tool tip is not shown when the <input type=”hidden” class=”rating”/> Tool tip is shown when the <input type=”hidden” class=”rating1″/> MY codes are here <input type=”hidden” class=”rating”/> <script> $(‘.rating’).rating({ extendSymbol: function (rate) { $(this).tooltip({ container: ‘body’, placement: ‘bottom’, title: ‘Rate

Continue reading

Submit form with selected options

Issue I want to be able to submit a form with selected option. My backend code is working if I’m using inputs: <input id=”id_value_0″ name=”value” type=”radio” value=”1″ /> <input id=”id_value_1″ name=”value” type=”radio” value=”2″ /> <input id=”id_value_2″ name=”value” type=”radio” value=”3″ />

Continue reading