pippopippo2 Posted March 3, 2014 Share Posted March 3, 2014 Hi, i want change the Data sheet of products in a progress bar with jquery ui. i changed this code in product.tpl <ul id="idTab2" class="bullet"> {foreach from=$features item=feature} {if isset($feature.value)} <li><span>{$feature.name|escape:'htmlall':'UTF-8'}</span> {$feature.value|escape:'htmlall':'UTF-8'}</li> {/if} {/foreach} </ul> in this: <div id="idTab2" class="bullet"> {foreach from=$features item=feature} {if isset($feature.value)} <div id="progressbar" class="{$feature.name|escape:'htmlall':'UTF-8'}">{$feature.name|escape:'htmlall':'UTF-8'}</div> <script> alert("messaggio"); $(function() { $(".{$feature.name|escape:'htmlall':'UTF-8'}").progressbar({ value: {$feature.value|escape:'htmlall':'UTF-8'}0 }); }); </script> <!-- <span>{$feature.name|escape:'htmlall':'UTF-8'}</span> {$feature.value|escape:'htmlall':'UTF-8'} --> {/if} {/foreach} </div> the alert works but not javascript, in the console i have this error Uncaught TypeError: Object [object Object] has no method 'progressbar' (anonymous function) o p.fireWith e.extend.ready c.addEventListener.B I tried to solve by adding this code in headers.tpl <script type="text/javascript" src="/js/jquery/ui/jquery.ui.progressbar.min.js"></script> but not working.Can help me? Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 3, 2014 Share Posted March 3, 2014 Hi. You should post the link to your site. Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
pippopippo2 Posted March 3, 2014 Author Share Posted March 3, 2014 (edited) Hi. You should post the link to your site. Regards. Robin. The CartExpert Team Sorry but i have a project in local This is a code in frontend: <div id="idTab2" class="bullet"> <div id="progressbar" class="Larghezza">Larghezza</div> <script> alert("messaggio"); $(function() { $(".Larghezza").progressbar({ value: 50 }); }); </script> <!-- <span>Larghezza</span> 5 --> </div> Edited March 3, 2014 by pippopippo2 (see edit history) Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 3, 2014 Share Posted March 3, 2014 You should call the function when the document is ready. $(document).ready( function() { $(".Larghezza").progressbar({ value: 50 }); }) Link to comment Share on other sites More sharing options...
pippopippo2 Posted March 4, 2014 Author Share Posted March 4, 2014 You should call the function when the document is ready. $(document).ready( function() { $(".Larghezza").progressbar({ value: 50 }); }) I tried but not work Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 4, 2014 Share Posted March 4, 2014 The <script></script> part should be between {literal}{/literal} Are you sure the progressbar script is loaded? Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
pippopippo2 Posted March 4, 2014 Author Share Posted March 4, 2014 The <script></script> part should be between {literal}{/literal} Are you sure the progressbar script is loaded? Regards. Robin. The CartExpert Team I try but not work, I'm not sure the script is loaded but if I insert alert("messaggio"); it work Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 4, 2014 Share Posted March 4, 2014 No, this script: /js/jquery/ui/jquery.ui.progressbar.min.js Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
pippopippo2 Posted March 4, 2014 Author Share Posted March 4, 2014 No, this script: /js/jquery/ui/jquery.ui.progressbar.min.js Regards. Robin. The CartExpert Team initially the script was not included ( at least I think ) and i add this: <script type="text/javascript" src="http://www.prova.it/js/jquery/ui/jquery.ui.progressbar.min.js "></script> in header.tpl and I replaced the file code with that of jqueryui.min Link to comment Share on other sites More sharing options...
pippopippo2 Posted March 5, 2014 Author Share Posted March 5, 2014 (edited) I put the site online test this, view the data sheet i want it this Edited March 5, 2014 by pippopippo2 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now