Thursday, January 19, 2012

cool use of Razor's Html.IdFor in jQuery

$('#@(Html.IdFor(m => m.Foo))').change(function() {

   alert('Hey');

});

 
 

.change() is not unlike .toggle() in some ways.

No comments:

Post a Comment