Just curious about which of these would be faster?
$('ul.dropdown a').first().click(function(event) {
event.stopPropagation();
return false;
});
or
$('.dropdown > li > a').click(function(event) {
event.preventDefault();
});
Is there any difference?
They do two different things.
I guess you’re asking about
>V.S. space:>is fatser then space, as it goes one level deep only.The tip with selectors is make the right side of it more precise than the left.
Read more here