0

This code is based on prototype and returns all the input elements that are inside span tags that have .myClass as the class attribute so I can iterate each one.
What will be the syntax for JQuery?

 $$('span.myClass input').each(function(element) {alert(element)}); 

2 Answers 2

3
 $('span.myClass input').each(function() {alert(this)});
-1
$.each($('span.myClass input'), function(element) {alert(element)});

Note: not tested.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.