
JavaScript libraries usage statistics: jQuery is used on the 55% of the top 1 million web-sites. jQuery market share: 91%.
jQuery(function($){ // document.ready and noConflict mode
$('.target').css('background-color', 'yellow');
$('.target').click(function() { // bind an event handler to the click
$(this).toggleClass('btn-primary');
$('.log').append(' click-event');
});
}); |
jQuery(function($){ // document.ready and noConflict mode
$('.target').css('background-color', 'yellow');
$('.target').click(function() { // bind an event handler to the click
$(this).toggleClass('btn-primary');
$('.log').append(' click-event');
});
});