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 » Plugins & Atahualpa »

WP-Table Reloaded code insert


  #1  
Old May 30, 2011, 03:46 AM
johnnybravo
 
36 posts · Apr 2011
Russia
Hello from Russia!!!
I have to insert this code to change the width of one column of my table.
Code:
/* Using aoColumns */
$(document).ready(function() {
	$('#example').dataTable( {
		"aoColumns": [ 
			{ "sWidth": "20%" },
			null,
			null,
			null,
			null
		]
	} );
} );
Please, tell me where this code to insert?
When I create a page that I put only the code table [table id=5 /]
  #2  
Old May 30, 2011, 03:56 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
What version of Atahualpa and WP?
What is the URL?
What table?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old May 30, 2011, 04:14 AM
johnnybravo
 
36 posts · Apr 2011
Russia
atahualpa 3.6.7 WP 3.1.3
http://pcs-nv.ru/?page_id=452
This table is imported from csv using the plugin WP-Table Reloaded. If you look at the third column (only in Opera 11.11), we can see that the numbers are shifted to the second line. I need to set a fixed width of the third column. To do this I need to add code that I wrote above.
Description of the code I took from here sWidth

Last edited by johnnybravo; May 30, 2011 at 04:36 AM.
  #4  
Old May 30, 2011, 04:38 AM
johnnybravo
 
36 posts · Apr 2011
Russia
Please note that the problems with the tables are observed only in Opera. In other browsers, it is no problem.
  #5  
Old May 30, 2011, 04:56 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
it may be that opera does not yet support this code. where did you put the code to make it work in the other browsers?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; May 30, 2011 at 04:58 AM.
  #6  
Old May 30, 2011, 05:17 AM
johnnybravo
 
36 posts · Apr 2011
Russia
The code I have nowhere to insert, because I do not know where. In other browsers, and without this code, everything works fine. only in Opera's column width is small. I need to register this code to column width has been fixed.
  #7  
Old May 30, 2011, 05:31 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
where does the site you got the code from say it should be iserted?
In the header?
in the body?
you can use the ato->Add HTML/CSS Inserts options depending on where it should go.

I took a quick look at the site you got the code from, but i can't devote the time to dig thru and find out where it should go on a page, you will have to do that or ask on their forum.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #8  
Old May 30, 2011, 05:35 AM
johnnybravo
 
36 posts · Apr 2011
Russia
Okay, thanks. Try to visit the Russian-speaking forums.
  #9  
Old May 31, 2011, 02:35 AM
johnnybravo
 
36 posts · Apr 2011
Russia
Hello.
I want to talk about solving my problem.
In a section of the plugin settings have JavaScript settings. This code must be inserted into user commands.
But the code should not be the one that I cited the example above.
It should be like this:
Code:
"aoColumnDefs": [{ "sWidth": "50px", "aTargets": [ 2 ] } ]
This code changes the width of the third column to a fixed size of 50 pixels. Why is [2]? Because the counter columns starting from zero.
This site has many useful functions. I recommend that you include jQuery (DataTables) in your template in the future.

Last edited by johnnybravo; May 31, 2011 at 02:39 AM.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with WP-Table-Reloaded Christophermathis New Versions, & Updating 2 Jan 10, 2011 11:57 AM
WP-Table Reloaded conflicting w/default tables? Shan_LSOS Plugins & Atahualpa 4 Sep 20, 2010 05:35 PM
How to Add Zebra Effect to Single Table with WP Table-Reloaded Plugin c12281 Plugins & Atahualpa 8 Aug 1, 2010 03:53 PM
jquery Expand Table Rows - where to insert code lrosenshine Atahualpa 3 Wordpress theme 0 May 10, 2010 02:27 PM


All times are GMT -6. The time now is 09:42 AM.


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