Archive

Archive for the ‘jQuery’ Category

Jquery Remove Attribute

<script type=”text/javascript”>
$(“:submit”).removeAttr(“disabled”);
</script>

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: jQuery Tags: ,

Nivo slider hide prev/next buttons if there is only one image

<script type=”text/javascript”>
jQuery(function($){
if(jQuery(‘.nivoSlider’).find(‘img’).length>1){
$(‘#slider’).nivoSlider({
effect: ‘fade’ // Specify sets like: ‘fold,fade,sliceDown’
});
}
});
</script>

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: jQuery Tags: ,

Remove class from element jquery

jQuery(“#element-id”).removeClass(“class-name”);

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: jQuery Tags: ,

Add a class to element jquery

jQuery(“#element-id”).addClass(“class-name”);

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: jQuery Tags: ,

Get the id of the element clicked jquery

<script>
$(“body”).click(function(event) {
alert(event.target.id)
});
</script>

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: jQuery Tags: , ,

Assign value to a textbox jQuery

jQuery(‘#text-box-id’).val(100);

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: jQuery Tags: , ,

Get the value of a text box jquery

jQuery(‘#text-box-id’).val();

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: jQuery Tags: , ,

Set the height of a div jquery

jQuery(‘#div-id’).height(100);

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Categories: jQuery Tags: , ,

Switch to our mobile site