Note that there are some explanatory texts on larger screens.

plurals
  1. POhaving error line when putting jquery code online
    primarykey
    data
    text
    <p>Planning to put an scrollable gallery online with <strong>lightbox</strong>. I have encounter an error, one of my code have <strong>unexpected " : ", expected one of: "}" , " " ,</strong> ATTR</p> <p>Using CMS Made Simple. for cmsms error, it display</p> <blockquote> <p>At line 702 in file /xxx/xxx/public_html/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php</p> </blockquote> <p>This is the code i plan to put on my website. <a href="http://sorgalla.com/jcarousel/" rel="nofollow">http://sorgalla.com/jcarousel/</a></p> <p>I will post my error here and my full script after that.</p> <p><strong>Error code.</strong></p> <pre><code>jQuery("#gallery-prev").click(function(){ if(jQuery("#gallery").position().left &lt; 0 &amp;&amp; !jQuery("#gallery").is(":animated")){ jQuery("#gallery").animate({left : "+=" + imageWidth + "px"}); } return false; }); </code></pre> <p><strong>Full code.</strong></p> <pre><code>&lt;script type="text/javascript"&gt; $(window).load(function(){ // Gallery if(jQuery("#gallery").length){ // Fancybox jQuery("#gallery li a").fancybox({ 'titleShow' : false, 'transitionIn' : 'elastic', 'transitionOut' : 'elastic' }); // Variables aren't use properly due to Webkit var totalImages = jQuery("#gallery &gt; li").length, imageWidth = jQuery("#gallery &gt; li:first").outerWidth(true), totalWidth = imageWidth * totalImages, visibleImages = Math.round(jQuery("#gallery-wrap").width() / imageWidth), visibleWidth = visibleImages * imageWidth, stopPosition = (visibleWidth - totalWidth); jQuery("#gallery").width(totalWidth); jQuery("#gallery-prev").click(function(){ if(jQuery("#gallery").position().left &lt; 0 &amp;&amp; !jQuery("#gallery").is(":animated")){ jQuery("#gallery").animate({left : "+=" + imageWidth + "px"}); } return false; }); jQuery("#gallery-next").click(function(){ if(jQuery("#gallery").position().left &gt; stopPosition &amp;&amp; !jQuery("#gallery").is(":animated")){ jQuery("#gallery").animate({left : "-=" + imageWidth + "px"}); } return false; }); } }); &lt;/script&gt; </code></pre> <p>appreciate for all help. thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload