It’s an example of useful jQuery way to limit user entering a maximum set number of character in your input fields. Example makes use of javascript substring function to limit user upto 20 character which is triggered on keyup event.…
Category: jQuery
Sum of values in input fields grouped by class attribute using jQeury
Here is the jQuery way to calculate the sum of all values stored in input fields grouped by class “.subtotal”. In this example the sum will be shown as an alert as soon as you leave a field after entering…
Fix to jQuery ui calendar not appearing from or hiding behind thickbox
If you are facing an issue of jQuery ui calendar not appearing while clicked from a jQuery thickbox or if some part of the calendar hiding behind the thickbox window you need to apply a quick fix to your calendar.
A possible reason for jQuery thickbox appearing twice on a click
I had an issue while using thickbox with jQuery today. The thickbox which i had been using to show ajax content opened twice. It appeared like one single window/thickbox but it stretched down the page making bottom border go out…
jQuery pop up message box sliding from left to right and positioning horizontally at the center
Just wrote a simple sliding box script to make a message box appear sliding from left to the middle of web page. The box appears once a day. The first appearance is logged into a browser cookie, so if user…
A simple javascript image slide show using setTimeout and jQuery
Just now i created a small slideshow. The slideshow uses some static images stored in a javascript object (array) and runs till the last image in this array. For example, the array:
Form DOM element not recognized (created) in ajax form in IE when placed with end tag missing
Skipping a form end tag </form> costed me almost a day (i had to go to bed abandoning the fixing for some time though;)). I had been using ajaxForm with jQuery to submit ajax form which was placed on a…
Fix to jQuery plugin does not work on ajax loaded content
I had been loading table records through ajax pagination using jquery. Some of the urls/links (View Details, Edit and Delete) in loaded content had been using thickbox to handle respective requests. Although, if i did’t use the ajax to load…
A note on DOM elements’ changed scope when using thickbox with jQuery
A similar situation may arise (atleast for me it did) when you try to invoke jQuery’s “thickbox” in conjunction with a custom onclick firing. I would explain it with the help of an example: I have a div element (with…
Setting Style/CSS of select options using jQuery
This is how i set style (color here) of all of the options of a select list using jQuery. In my case i had select options like this: <select id=”select_list_id”> <option value=”#595959″>Grey</option> <option value=”#000000″>Black</option> <option value=”#036″>Blue</option> <option value=”#363″>Green</option> <option value=”#632423″>Red</option>…