Selector on every radio button click I am constructing a selector on every radio button click. Since I am using the table repeatedly on every radio click, I cached it like:

var $t1 = $("#tableone");


but inside the radio check event, I need to retrieve the selector to construct a string.

Approach 1:

$radio.click(function () {
        var temp = $t1.selector + " ." + $(this).attr("mobnum");


Note: If I do not $t1.selector, it comes as [object][Object] which I do not want, so I have to use $t1.selector.

Since I am using $t1.selector to construct temp every time radio is clicked, is there still a benefit caching the table at the beginning?

Approach 2:

$radio.click(function () {
var temp = $("#tableone") + " ." + $(this).attr("mobnum");


Which one's better?
I don't think your approach 2 will do what you want. So I the first one would be better.

It looks to me though that you are building another selector. Probably to find the child element. So I would recommend something like this:

var $c = $t1.find("." + $(this).attr("mobnum")).


This returns the child element. This way you are already selecting only out of the children of $t1. Which would be more efficient, in theory.