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…
Tag: jQuery
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>…
Autocomplete=”off” workaround / fix for valid XHTML
Add an onload function similar to the following to <head> section of your web page. <script type=”text/javascript”> function onload_call() { if (!document.getElementById) return false; var f = document.getElementById(‘field_name’); f.setAttribute(“autocomplete”, “off”); } </script>
Checking / Unchecking radio buttons and retrieving their value in jQuery
Let us assume we have radio buttons <input name=”rd_name” id=”RD1″ value=”Value One” /> Label 1 <input name=”rd_name” id=”RD2″ value=”Value Two” /> Label 2 To retrieve and set radio button values by id we have the following methods. To retrieve we…