I'd like to create a function triggerd by certain classes. I tried it like that but it didn't work :(
var ajaxlinks = $(".ajaxlink") $(".navlinks").find('a'); ajaxlinks.click(function(e){ ... }
What am I doing wrong?
You can use a , to separate different selectors:
,
$(".ajaxlink, .navlinks").find("a");
2.1m questions
2.1m answers
60 comments
57.0k users