Correct way for using Jquery from ASP.net
Hello,
I'm trying to add some functionality to the click event on the client-side and am confused as to what the difference between these 2 methods is.
Both seem to do the same thing. Is there a difference between the 2 ways? Is there a preferred way for wiring up the click event handler?
var button5 = $('#Button5');
button5.click(function () {
$('#MainContent').css('background-color', 'yellow');
});
var button5 = $('#Button5');
button5.bind('click', function () {
$('#MainContent').css('background-color', yellow');
});
Thank you.
Tulsi
|