Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9214999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:06:11+00:00 2026-06-18T02:06:11+00:00

Planning to put an scrollable gallery online with lightbox . I have encounter an

  • 0

Planning to put an scrollable gallery online with lightbox. I have encounter an error, one of my code have unexpected ” : “, expected one of: “}” , ” ” , ATTR

Using CMS Made Simple.
for cmsms error, it display

At line 702 in file /xxx/xxx/public_html/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php

This is the code i plan to put on my website.
http://sorgalla.com/jcarousel/

I will post my error here and my full script after that.

Error code.

jQuery("#gallery-prev").click(function(){
            if(jQuery("#gallery").position().left < 0 && !jQuery("#gallery").is(":animated")){
                jQuery("#gallery").animate({left : "+=" + imageWidth + "px"});
            }
            return false;
        });

Full code.

<script type="text/javascript">
$(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 > li").length, 
            imageWidth = jQuery("#gallery > 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 < 0 && !jQuery("#gallery").is(":animated")){
                jQuery("#gallery").animate({left : "+=" + imageWidth + "px"});
            }
            return false;
        });

        jQuery("#gallery-next").click(function(){
            if(jQuery("#gallery").position().left > stopPosition && !jQuery("#gallery").is(":animated")){
                jQuery("#gallery").animate({left : "-=" + imageWidth + "px"});
            }
            return false;
        });
    }

});
</script>

appreciate for all help.
thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:06:12+00:00Added an answer on June 18, 2026 at 2:06 am

    You seem to be using smarty, and the problem is that smarty is getting confused with the opening/closing brackets {}. Try to surround the script with smarty’s {literal} tag, ie.:

    {literal}
    <script.....
    
    </script>
    {/literal}
    

    Also, if you’re using smarty 3, it will probably work without the literal tag, by just adding a space after every “{” and before every “}”

    jQuery("#gallery").animate({ left : "+=" + imageWidth + "px" });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm planning to code a Web2 online application and I'm looking for best-practices. I'm
I have one .c file and one .h. I am not planning to have
Issue I'm planning on making a lightbox-like project page. I want to have it
I'm planning to put some Java code in an appendix to my report. The
Simply put, I have these tables. Planning: Date | Machine | Product | PlanningParts
I am planning on sending SMS messages in my app. I have this code
I am planning to put together a small .NET using C# for Windows app.
I was planning on putting youtube(website) in an iframe and then put my own
Planning to create a new website for our product using ASP.NET MVC 4. Site
im planning to create a movie file that might have over 16,000 frames?i know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.