Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

jquery Expand Table Rows - where to insert code


  #1  
Old May 10, 2010, 02:27 PM
lrosenshine
 
1 posts · May 2010
Hello,

I am trying to incorporate some jquery function to expand table cells on click:
http://www.jankoatwarpspeed.com/post/2009/07/20/Expand-table-rows-with-jQuery-jExpand-plugin.aspx


I am a bit hesitant to mess around too much in the js.php file, as I'm not sure where to insert the jquery js code:
Code:
(function($){
    $.fn.jExpand = function(){
        var element = this;

        $(element).find("tr:odd").addClass("odd");
        $(element).find("tr:not(.odd)").hide();
        $(element).find("tr:first-child").show();

        $(element).find("tr.odd").click(function() {
            $(this).next("tr").toggle();
        });
        
    }    
})(jQuery);
I am also a bit worried this might conflict with the scripting already running to highlight cells on mouse over (but I guess I can deal with that once I try to implement it.

Wordpress 2.9.2
Atahualpa 3.4.6

Thanks for any help!

Bookmarks

Tags
jquery, js.php, table cell expand

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem getting jQuery code to execute Eric Bobrow Plugins & Atahualpa 1 Jan 23, 2010 11:38 PM
Where to insert code for jquery plugins ? twola Header configuration & styling 3 Jan 23, 2010 11:18 PM
Can anyone recommend a method to insert a table so I can list things for sale? cdgeorge Plugins & Atahualpa 8 Oct 26, 2009 04:23 AM
Textboxes for entering css code don't expand Konzertheld Atahualpa 3 Wordpress theme 12 Sep 13, 2009 10:07 AM
a.js is adding 'alt' class to table rows billy2 Plugins & Atahualpa 2 Aug 16, 2009 03:17 AM


All times are GMT -6. The time now is 10:44 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.