Question: I have the value `0x4D79205465737420537472696E67` in a varchar(max) column in SQL Server. I want to convert it into binary value `0x4D79205465737420537472696E67` and retrieve the first 3 bits of the 0th Byte.

Any help would be appreciated, thanks.

Answer: 
I'm not exactly sure what you mean by "query later on" - i.e., when do you want to query, and what are you going to use the element for? If you want to access the clicked element while you're in the same HTML page (assuming that the click doesn't lead to another page), you can use the `this` keyword in your click handler to retrieve the clicked element, and then store it in some variable that you can access later on. 

However, if you want to keep some sort of record of the clicked elements for future use (e.g., identifying what elements to click in a Selenium test case), you can uniquely identify elements in an HTML page by their Xpath, assuming that the DOM does not change along the way. For instance, you can do something like this

```
$("a").click(function() {
    var theClickedElement = $(this);
    getXpath(theClickedElement); //Display the return value of this somewhere
}

```

You can implement getXpath() using something similar to [this answer](https://stackoverflow.com/a/3454579/2825340) (The code in the link calculates the relative Xpath - you can also get the absolute Xpath that contains only the tag names. For more information on XPath, check out [this tutorial](http://www.w3schools.com/xpath/)
Simply hold the element that has been clicked and store it. That would help you retrieve it later without explicitly defining an id attribute. 

HTML :

```
<a href="#a">Bar</a>
<a href="#b">Foo</a>

```

javaScript :

```
var clickedNode = [];
var counter = 0;

$("a").click(function(){
    clickedNode[counter] = $(this);
    alert(clickedNode[counter].text());
     counter++;
});

$("#lastValueButton").click(function(){
    alert(clickedNode[counter-1].text());
});

```

[**Demo**](http://jsfiddle.net/codeSpy/5JWMk/)