Totty.js Totty.js - 1 year ago 74
jQuery Question

Jquery: How to select only within a selection?

var parent = $("#jcontent");
var button1 = parent(".button1")

How to select
knowing it is inside the parent while not reusing

I need to do this because I only want to pass the parent as parameter and to be able to cache it which is faster.

Answer Source

Another alternative

var parent = $("#jcontent"); 
var button1 = $(".button1", parent) ;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download