Open handoyo opened 10 years ago
// jQuery 1.7+
$(function () {
$('a.something').on("click", function (e) {
e.preventDefault();
});
});
// jQuery < 1.7
$(function () {
$('a.something').click(function (e) {
e.preventDefault();
});
// or
$('a.something').bind("click", function (e) {
e.preventDefault();
});
});
Hi,thanks for the help.But what i would like to achieve is to disable menu item from clicking instead of preventing it to open href.
I don't understand what you mean by preventing it from clicking. @handoyo see this http://stackoverflow.com/questions/10276133/how-to-disable-html-links
Hi,i would like to ask if it's possible to enable or disable menu item via code programtically?Thanks a lot.