pager sorting removing jquery event handlers
Eric Dalquist
eric.dalquist at doit.wisc.edu
Thu Jan 27 00:49:43 UTC 2011
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
-------------- 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/20110126/6f12b7b5/attachment.bin>
More information about the fluid-work
mailing list