Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

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

WP-Table Reloaded code insert


  #1  
Old May 30, 2011, 04: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, 04:56 AM
juggledad's Avatar
juggledad
 
23,597 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, 05: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 05:36 AM.
  #4  
Old May 30, 2011, 05: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, 05:56 AM
juggledad's Avatar
juggledad
 
23,597 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 05:58 AM.
  #6  
Old May 30, 2011, 06: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, 06:31 AM
juggledad's Avatar
juggledad
 
23,597 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, 06:35 AM
johnnybravo
 
36 posts · Apr 2011
Russia
Okay, thanks. Try to visit the Russian-speaking forums.
  #9  
Old May 31, 2011, 03: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 03: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 12:57 PM
WP-Table Reloaded conflicting w/default tables? Shan_LSOS Plugins & Atahualpa 4 Sep 20, 2010 06:35 PM
How to Add Zebra Effect to Single Table with WP Table-Reloaded Plugin c12281 Plugins & Atahualpa 8 Aug 1, 2010 04:53 PM
jquery Expand Table Rows - where to insert code lrosenshine Atahualpa 3 Wordpress theme 0 May 10, 2010 03:27 PM


All times are GMT -6. The time now is 10:42 PM.


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