Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

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

jquery Expand Table Rows - where to insert code


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old May 10, 2010, 03:27 PM
lrosenshine
 
1 posts · May 2010
jquery Expand Table Rows - where to insert code

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 24, 2010 12:38 AM
Where to insert code for jquery plugins ? twola Header configuration & styling 3 Jan 24, 2010 12:18 AM
Can anyone recommend a method to insert a table so I can list things for sale? cdgeorge Plugins & Atahualpa 8 Oct 26, 2009 05:23 AM
Textboxes for entering css code don't expand Konzertheld Atahualpa 3 Wordpress theme 12 Sep 13, 2009 11:07 AM
a.js is adding 'alt' class to table rows billy2 Plugins & Atahualpa 2 Aug 16, 2009 04:17 AM


All times are GMT -6. The time now is 01:54 AM.


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