Hi,
I'm having trouble using the $(this) identifier in JQuery. I'm using the qtip plugin, and I want to send an ajax request, which can be done with the plugin. I'm trying to pass the id of the element to the script but it's not seeming to work - the script doesn't pick up any value (I know it works because I passed a fixed integer and it worked)
Here's my script:
<script>
$(document).ready(function(){
$('div.portal_entry.smalldetails').qtip({
content: {
url: '/Scripts/ajax/portal_qtip.php',
data: { id: $(this).attr('id') },
method: 'get'
}
});
});
</script>
And the HTML:
<div class="portal_entry smalldetails" id="b63">
<a href="/portal/63"><img src="http://www.nocturnalhaunt.com/Thumbnails/1257165890.png" class="image" width="50" height="50"/></a>
<div class="details">
<a href="/portal/63" class="portal_title">The Green Knight</a>
<small style="display: block; padding-left: 10px;">~Paradox</small>
</div>
Thanks, hopefully its just a simple mistake
~Chris