pager sorting removing jquery event handlers

Eric Dalquist eric.dalquist at doit.wisc.edu
Thu Jan 27 15:15:26 UTC 2011


That fixed it, thanks.

On 1/27/11 8:50 AM, Justin Obara wrote:
> Hi Eric,
>
> If I'm not mistaken, you should be able to just move the rsf:id from the anchor to the th.
> (i.e.<th rsf:id="date" class="..."><a>Date</a></th>)
>
> Thanks
> Justin
>
> On 2011-01-26, at 7:49 PM, Eric Dalquist wrote:
>
>> I have a pager setup with sortable columns, the table head looks like:
>>
>> <thead>
>> <tr rsf:id="header:">
>> <th class="flc-pager-sort-header hrs-pager-head-date hrs-clickable"><a href="javascript:;" rsf:id="date">Date</a></th>
>> <th class="flc-pager-sort-header hrs-pager-head-status hrs-clickable"><a href="javascript:;" rsf:id="status">Status</a></th>
>> <th class="flc-pager-sort-header hrs-pager-head-total hrs-clickable"><a href="javascript:;" rsf:id="total">Total</a></th>
>> <th class="flc-pager-sort-header hrs-pager-head-type hrs-clickable"><a href="javascript:;" rsf:id="type">Type</a></th>
>> </tr>
>> </thead>
>>
>> To make it so the user can click anywhere in the<th>  I have a little bit of jquery that does:
>>
>>         (".hrs-clickable").click(function() {
>>             //Simulate a click on the first anchor and click on it
>>             $(this).find("a").first().click();
>>         });
>>
>> The problem is this only works once. It appears that when a sort event occurs all of my click handlers disappear. Doing the following in my click code fixes it:
>>
>>         (".hrs-clickable").live("click", function() {
>>             //Simulate a click on the first anchor and click on it
>>             $(this).find("a").first().click();
>>         });
>>
>> I'd rather that my event handlers that I add to the th elements stayed in place after a sort happens though. I'm using Fluid 1.2.1.
>>
>> -Eric
>>
>> _______________________________________________________
>> fluid-work mailing list - fluid-work at fluidproject.org
>> To unsubscribe, change settings or access archives,
>> see http://fluidproject.org/mailman/listinfo/fluid-work

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3397 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://fluidproject.org/pipermail/fluid-work/attachments/20110127/286a7c7e/attachment.bin>


More information about the fluid-work mailing list