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");
548k questions
547k answers
4 comments
86.3k users