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: 
if you handle the click event, you will get the element in this variable. you can store it in a local or even a global variable to keep a reference to it. something like this:

outside of the event handler, maybe on load of the page:

```
var lastClickedElement;

```

and then inside your click event handler:

```
function() {
    lastClickedElement = this;
}

```

and then you have always a reference to the last clicked element.
As the answer on you title question:

Following to [manual](http://api.jquery.com/category/selectors/) you can find links by it href like this:

```
$('a[href="/baz"]')

```

Also you can find elements that contains some text ([manual](http://api.jquery.com/contains-selector/))

```
$("a:contains('Bar')")

```