Posted: February 9th, 2010 | Author: admin | Filed under: Javascript | Tags: jQuery | No Comments »
This tutorial illustrates how to check if a plugin exists or if plugin has been already loaded usingĀ jQuery. This is particularly useful if you are writing your jQuery code that depends on that plugin.
if(jQuery().plugin_name) {
// plugin exists
} else {
// plugin not loaded
}
Posted: June 8th, 2009 | Author: admin | Filed under: Javascript | Tags: jQuery, radio buttons | 2 Comments »
Here’s a tutorial on how to get the value of a checked or selected radio button out of a group of radio buttons:
...
<input type="radio" name="sample" value="1" />
<input type="radio" name="sample" value="2" checked="checked" />
<input type="radio" name="sample" value="3" />
...
//javascript code
<script type="text/javascript">
<!--
// displays the selected radio button in an alert box
alert($('input[name=sample]:checked').val())
-->
</script>