Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-24-2011, 12:38 PM   PM User | #1
toplisek
Regular Coder

 
Join Date: May 2006
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
toplisek has a little shameless behaviour in the past
Question How to avoid smarty error when using title="$

Is possible to avoid an error within Smarty for ScrollTo?

I have code like:
<a href="#" title="$(...).scrollTo( 'li:eq(15)', {duration:10000} );" class="mybuttonback">To the Top</a>

I can not use this as it shows an error inside Smarty templates.
toplisek is offline   Reply With Quote
Old 10-24-2011, 02:51 PM   PM User | #2
venegal
Gütkodierer


 
Join Date: Apr 2009
Posts: 2,127
Thanks: 1
Thanked 426 Times in 424 Posts
venegal has a spectacular aura aboutvenegal has a spectacular aura about
You can't use that anyway — putting code into a title attribute doesn't make any sense. Just keep your code out of your HTML, and you're fine.

If you do have the need to use the Smarty delimiters (braces) inside your HTML without them being interpreted as Smarty tags, use {ldelim} and {rdelim} instead.
__________________
.My new Javascript tutorial site: http://reallifejs.com/
.Latest article: Calculators — Tiny jQuery calculator, Full-fledged OOP calculator, Big number calculator
.Latest quick-bit: Including jQuery — Environment-aware minification and CDNs with local fallback
venegal is offline   Reply With Quote
Old 10-24-2011, 05:02 PM   PM User | #3
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,584
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
… or use Smarty’s {literal}
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 10-25-2011, 07:02 AM   PM User | #4
toplisek
Regular Coder

 
Join Date: May 2006
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
toplisek has a little shameless behaviour in the past
Thanks for fast reply. It works now.
toplisek is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:21 PM.


Advertisement
Log in to turn off these ads.