JQuery
-
Select elements with a specific attribute using JQuery
Here let us assume that we have an HTML mark up as follows <table Id="YearlyGridReport"> <tr level="1"> <td >Header Row1</td> <th ><span>2014</span></th> <th><span>2015</span></th> </tr> <tr level="2"> ... -
JQuery Language Selector
Using the lang attribute to our HTML element, here I am using a div <div lang="en"> <div lang="en-us"> Using the JQury Selector to select that element ... -
Find a string contains a particular string in JQuery
var myVar="sibeesh passion"); if (myVar.toString().indexOf('passion') > 0) { } else { } The above code helps you to find whether a string contains a particular string ... -
Check whether an array element is undefined or not in jQuery
This will help you to check whether an array element is undefined or not in jquery if (typeof localHeaderColumnArray[0] != 'undefined' ) { } else { ... -
Parse a string to Json in JQuery
This will help you to parse a string to Json var jsonConvert = $.parseJSON(changedColumnHeaders); Here changedColumnHeaders is my json string -
Delete an element from an array in jQuery using the index
This will solve you to delete an element from an array in JQuery using the index Consider following is my array localHeaderColumnArray: Array[2] 0: "f" 1: ... -
Round Off the number to two decimal places in jQuery
Round Off the number to two decimal places in JQuery. var num=2.48776582879546876542576876875325438965235; alert( num.toFixed(2)); Here toFixed is the function which does the operation. You can set ... -
Find a number from a string and remove in jQuery
Find a number from a string and remove in JQuery var str="Sibeesh007" str.replace(str.match(/(\d+)/g)[0], '').trim(); Here str is my string. I hope it helps. -
Remove % and $ From a String using JQuery
var num='$100%'; $('div').text(num.replace(/\,/g, '').replace(/\$/g, '').replace(/\%/g, '')); Kindest Regards Sibeesh Venu -
How to reload the page when resize the page in jQuery
The following method will help you to reload the page when you resize the page, For example when you press F12 in your browser $(window).on('resize', function ...