We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Tablesorter jQuery plugin issue with EE

Development and Programming

titm0use's avatar
titm0use
18 posts
13 years ago
titm0use's avatar titm0use

I am using the Tablesorter jQuery plugin with EE. It’s working except for the Pager plugin.

Check the following page for how it’s used and how it’s working (demo):

http://tablesorter.com/docs/example-pager.html

Since brackets are used in the following javascript code it’s processed by EE as well. I am aware of the protect_javascript variable in EE (default is ‘y’): http://expressionengine.com/legacy_docs/general/hidden_configuration_variables.html#protect_javascript

I played with it but it’s not working.

$(document).ready(function() { 
    $("table") 
    .tablesorter({widthFixed: true, widgets: ['zebra']}) 
    .tablesorterPager({container: $("#pager")}); 
});

If my page loads the javascript above will result (in HTML) as:

$(document).ready(function() { 
    $("table") 
    .tablesorter() 
    .tablesorterPager(); 
});

Can someone please help me with this?

Thanks!

       
ctmaloney's avatar
ctmaloney
12 posts
13 years ago
ctmaloney's avatar ctmaloney

I’ve had this issue in the past, changing the formatting to below generally works for me.

$(document).ready(function() { 
    $("table") 
    .tablesorter({
        widthFixed: true,
        widgets: ['zebra']
    }) 
    .tablesorterPager({
        container: $("#pager")
    }); 
});
       
titm0use's avatar
titm0use
18 posts
13 years ago
titm0use's avatar titm0use
I’ve had this issue in the past, changing the formatting to below generally works for me.

It works! Brilliant!

Thanks a lot!!!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.