defunkt/jquery-pjax — Issue #67: One way in which $.pjax doesn't mimic $.ajax?
Author: tim-peterson
Created: 2011-11-06 22:12:17+00:00
State: open

Hi all, i'd like to call $.pjax inside a click(function(){}) such that I can use $(this) to get the attributes of a selected pjax-ified link. The goal is to send POST data specific to which link was clicked.

Here's some example code:

link_1
link_2

$('a.each_link').live('click', function(){
var title=$(this).attr('title)';
$.pjax({url: '/link' , type: 'POST', data: 'posted_data='+title+'' });

in this case, 'title' is not defined and in fact it kills my browser.

Can anyone advise on whether this is a $.pjax specific quirk?

thanks,
tim