onclick="func()" or .click()?
jquery
Solution
One of the main ideas behind jQuery is unobtrusive javascript (i.e. HTML and javascript are two great tastes that don't taste great together). Using the jQuery object and selectors to attach the functions is what they would prefer you do.
Problem
I was wondering which one of the above methods is preferred or is the general guideline that you use $(elem).click() for simple things and < a onclick="func(1, 2, 3, 4);" > when you need to pass parameters to the script when the element is clicked? I've been trying to only use $(elem).click() to keep the code clean and simple, but when you have to pass more than one parameter it gets tricky and function call on onclick="" seems like a better solution.