pol2005 Posted October 10, 2010 Share Posted October 10, 2010 Hi i designed a layout for whmcs but i have a problem.I've included a jquery tabs animation but it's not working. Here is my header.tpl : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset={$charset}" /> <title>{$companyname} - {$pagetitle}{if $kbarticle.title} - {$kbarticle.title}{/if}</title> {if $systemurl}<base href="{$systemurl}" /> {/if}<link rel="stylesheet" type="text/css" href="templates/{$template}/style.css" /> <script type="text/javascript" src="includes/jscript/jquery.js"></script> <script type="text/javascript" src="http://cdn.jquerytools.org/1.2.5/jquery.tools.min.js"></script> {if $livehelpjs}{$livehelpjs} {/if} </head> <body> <div class="default" id="wrapper"> <div class="header"> <div class="logo"> <ul id="nav-primary"> <li><a href="http://www.easyspace.gr">Home</a></li> <li><a href="cart.php">Προιόντα</a></li> <li><a href="clientarea.php">Περιοχή Πελατών</a></li> <li><a href="submitticket.php">Νέο Αιτήμα Υποστήριξης</a></li> <li><a href="supporttickets.php">Αιτήματα Υποστήριξης</a></li> <li><a href="domainchecker.php">Domains</a></li> <li><a href="contact.php">Επικοινωνία</a></li> </ul> </div> </div><!-- end header --> <div class="header2"> <div class="header2-wrap"></div> </div> <!-- end header2 --> The site is easyspace.gr 0 Quote Link to comment Share on other sites More sharing options...
pol2005 Posted October 11, 2010 Author Share Posted October 11, 2010 ok i found it i put a {literal} around javascript code and it worked 0 Quote Link to comment Share on other sites More sharing options...
Dgital Essence Posted February 5, 2011 Share Posted February 5, 2011 Hi, I'm trying to add some JQuery bits and bobs to my templates and am having problems, mainly that I don't understand what pol2005 means by putting {literal} arounf the javascript. Doe she just mean putting { and } around the code within the script tags? 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted February 5, 2011 Share Posted February 5, 2011 see google's first result for "smarty manual" 0 Quote Link to comment Share on other sites More sharing options...
Dgital Essence Posted February 5, 2011 Share Posted February 5, 2011 see google's first result for "smarty manual" Ah, I have been firmly. but politely told to RTFM for which I thank you squire! I had completely forgotten WHMCS was Smarty templates and spent far too long searching this forum using the wrong search queries and coming up with nothing. I will go now and read the manual... thanks, Hedley 0 Quote Link to comment Share on other sites More sharing options...
Dgital Essence Posted February 6, 2011 Share Posted February 6, 2011 I have read the docs, followed examples and am still not able to get my Javascript to work correctly. I am using this js to load Tweets into my footer: <script type="text/javascript"> $(document).ready(function() { $("#twitter").getTwitter({ userName: "dedesignandhost", loaderText: "Loading tweets..." }); }); </script> I have tried wrapping the entire block, including the <script> </script> in {literal} {/literal}, then inside of that, and all over the place. Currently I have: <script type="text/javascript"> {literal} $(document).ready(function() { $("#twitter").getTwitter({ userName: "dedesignandhost", loaderText: "Loading tweets..." }); }); {/literal} </script> and the error I get is: $("#twitter").getTwitter is not a function (?)()hosting.php (line 29) noConflict(j=function())jquery.min.js (line 29) j = function() inArray()jquery.min.js (line 37) [break On This Error] loaderText: "Loading tweets..." hosting.php (line 29) This function is working in a normal HTML template and I am at a loss as to why I can't get it to work in my templates. Is this suitable for this forum or should I take it over the Smarty forum? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.