I have a list of items that I'd like to perform the same action on. They all have separate IDs so I want to be able to pass the name of each one to Jquery so that the action is only performed on that ID. For example:
<a href="#" id="1">one</a>
<a href="#" id="2">two</a>
<div id="#test1"></div>
<div id="#test2"></div>
I want to be able to do something like this:
function doSomething(x) {
var div=x+'div';
$(x).click(function() { $.(div).slideDown(); });
}
Any thoughts?
Thanks.