Q:

find class using jquery

var myVar = $("#start").find('.myClass').val();
1
$(".txtClass")                  =>  getElementsByClassName()

$("#childDiv2 .txtClass")       =>  getElementById(),
                                    then getElementsByClassName()

$("#childDiv2 > .txtClass")     =>  getElementById(),
                                    then iterate over children and check class

$("input.txtClass")             =>  getElementsByTagName(),
                                    then iterate over results and check class

$("#childDiv2 input.txtClass")  =>  getElementById(),
                                    then getElementsByTagName(),
                                    then iterate over results and check class
2
$('article a').click(function() {
    $(this).parent().find('h3').slideToggle('fast');
});
1

New to Communities?

Join the community