I've been using DataTables a lot these days, it's good. Actually, it's a very good plug-in for displaying data in table ( haha ), with lots of interaction. Few and should be implemented feature: Can't export multiple table headers API for table width in PDF Export Adding header and footer for Excel Export DataTables uses pdfmake library for its pdf export module. Sample output of pdf To make the table width 100%, as per pdfmake documentation we should set its width to "*". Here it goes: Edit the datatables JS file, find t.table.widths="auto" , change it to t .table.widths="*" . You might want to change the alignment of the table header also: Find tableHeader:{bold:!0,fontSize:11,color:"white",fillColor:"#2d4154",alignment:"center" Set the alignment to left. sample output after the tweak
Well, I don't advise doing this , but it's quite FUN ! This script will enable your blog reader to choose the color of your blog/template body background. Here is the DEMO . (Scroll down at the bottom of the page.) How to implement it JavaScript: Paste the code below above the </head>. <script style='text/javascript' type='text/javascript'> var backColour = new Array(); backColour[ 0 ] = ' #FFFFFF '; backColour[ 1 ] = ' #000000 '; function changeBG(whichColour){ document.body.style.backgroundColor = backColour[whichColour]; } </script> The RED text is the hexadecimal color value. You can change it whatever you want. Get color values here . The BLUE serves as the "holder" of the color. HTML: <h4 style='text-align:center'>Change background to: <a href='#' onclick='javascript:changeBG( 0 );'> //WHITE </a> <a href=...
Comments
Post a Comment
Feel free to ask, suggest and comment regarding this post/blog. You can also contact me through e-mail, just always use the contact page. Thank you for visiting this blog.