diff -r 561aa6d282f6 -r 5cb854c0ff5a web/wp-content/themes/IRI-Theme/js/jquery.skinned-select.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/js/jquery.skinned-select.js Mon Feb 01 09:53:45 2010 +0000 @@ -0,0 +1,26 @@ +$(document).ready( + function() { + $('.my-skinnable-select').each( + function(i) { + selectContainer = $(this); + // Remove the class for non JS browsers + selectContainer.removeClass('my-skinnable-select'); + // Add the class for JS Browers + selectContainer.addClass('skinned-select'); + // Find the select box + selectContainer.children().before('
a
').each( + function() { + $(this).prev().text(this.options[0].innerHTML) + } + ); + // Store the parent object + var parentTextObj = selectContainer.children().prev(); + // As we click on the options + selectContainer.children().click(function() { + // Set the value of the html + parentTextObj.text(this.options[this.selectedIndex].innerHTML); + }) + } + ); + } +);