I am trying the following:
var showTooltip = function(event) {
if(event.target == "<a href=\"view_repair.php\">") {
$tooltip
.text('View full repair details')
.fadeIn('slow');
positionTooltip(event);
console.log(event.target) in Firebug gives
<a href="view_repair.php">
But the code inside the if statement isn't being run. Is this because the if statement is comparing against the actual string it's being given - including the escapes?
When I change the if statement to:
if(event.target == event.target)
I get the desired result.
What I'd really like to be able to do is use the link name/title to do the comparison, i.e. (pseudo code):
if(event.target.text() == "View")
Is this possible in any way?