javascript - Running script with onclick event when only inside a particular div element -


i'm looking @ running script:

$(document).ready(function() {     $('a').click(function(e) {         var urlyep=(this)         e.preventdefault();         $("#content").load($(urlyep).attr('href'));     }); }); 

this loads content local html file via menu hyperlink #content div. works great want make more specific works when click made in #menubar div.

err… mean $('#menubar a').click(…) ?


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -