iosscripts / iosslider

iosslider is a jQuery plugin which allows you to integrate a customizable, cross-browser content slider into your web presence. Designed for use as a content slider, website banner, or image gallery.
http://iosscripts.com/iosslider
432 stars 103 forks source link

iosSlider doesn't work well with templating engines <script> junk #81

Closed nicolasembleton closed 12 years ago

nicolasembleton commented 12 years ago

When you use Ember.js/Handlebar.js, you got to get a lot of junk into your DOM being surrounding pretty much every "binded" values that the script will need to output.

If you take a look at this gist: https://gist.github.com/3354451

This gist is exactly 1 of my slider ( I have multiple sliders within a page ). When I try to trigger iosSlider using

$('.iosSlider').iosSlider({ desktopClickDrag: true }); 

I get an error:

SyntaxError: Unexpected token ILLEGAL

If I remove all the

...
etc... From what I understand, your saying that your page will function correctly if the script skips over these "script" elements? I can modify the script to blacklist all script tags. I think it is perfectly reasonable to assume that you should not be able to use script tags as slide nodes. — Reply to this email directly or view it on GitHubhttps://github.com/iosscripts/iosSlider/issues/81#issuecomment-7745885.
iosscripts commented 12 years ago

It's late here in Toronto. I will do some testing on my end and have something for you in half a day or so.

nicolasembleton commented 12 years ago

Yeah sure. No problem. Thanks a lot for the support. On Aug 15, 2012 9:31 AM, "Marc Whitbread" notifications@github.com wrote:

It's late here in Toronto. I will do some testing on my end and have something for you in half a day or so.

— Reply to this email directly or view it on GitHubhttps://github.com/iosscripts/iosSlider/issues/81#issuecomment-7746530.

iosscripts commented 12 years ago

One quick attempt before I take off. I just pushed v1.0.33 to master with a possible fix. Let me know if it works :)

nicolasembleton commented 12 years ago

Hey great. I'm gonna try that right away and send you the feedbacks. :) Thanks and good night.

2012/8/15 Marc Whitbread notifications@github.com

One quick attempt before I take off. I just pushed v1.0.33 to master with a possible fix. Let me know if it works :)

— Reply to this email directly or view it on GitHubhttps://github.com/iosscripts/iosSlider/issues/81#issuecomment-7746769.

nicolasembleton commented 12 years ago

Yeehaa. Working great.

On the mea culpa side, I also had another issue that was still causing me "ILLEGAL TOKEN", a malformed onclick event that was crashing when it was being transferred to jQuery.data() stack. Here's the log of "this" on line 789 and the error following the .data() call:

<a id=​"p-61" onclick=​"javascript:​openHash(\'#id-61\')​;​" style=​"z-index:​1000;​">​shortDesc61​</a>  - jquery.iosslider.js:789
  SyntaxError: Unexpected token ILLEGAL

Anyway, onclick events are evil. I should avoid them...

Thanks a lot for the Githubissues.

  • Githubissues is a development platform for aggregating issues.