2

I have a problem setting options to Zurb Foundation component - joyride. I cannot seem to get it to set a cookieMonster variable and then don't show joyride next time.

Please note that I'm not using a standalone version of joyride but one bundled with Zurb Foundation 4 which seems to take arguments differently than standalone version.

html code (slim template, should be obvious)

ol(class="joyride-list" data-joyride)
  li(data-id="draft" data-text="Next" data-options="tipLocation:bottom;")
    h4 Welcome!
    p Hello and welcome!
  li(data-id="to_proofread" data-text="Next" data-options="tipLocation:right;")
    h4 Proofreading
    p Lorem ipsum.

and js:

$(document).foundation('joyride', 'start')

This setup actually works - as it displays joyride,and respects per tip options, but it completely ignores "cookieMonster" and "CookieDomain" options, and I cannot find any way to set those options. Tried experimenting, reading code (seems to be obfuscated on purpose), or debugging (again, very hard, lots of stuff is wrapped into private closures, so no way to get to it from JS console).

Lowkase
  • 5,631
  • 2
  • 30
  • 48
Marcin Raczkowski
  • 1,500
  • 1
  • 18
  • 26
  • 1
    post your code, if possible simulate the same on jsfiddle – dreamweiver May 07 '13 at 12:45
  • Hard to replicate on fiddle without adding a lots of foundations scripts I've updated question with code though. – Marcin Raczkowski May 07 '13 at 12:50
  • hey i dont the place where you have initialized `cookieMonster : false,` `cookieName : 'joyride'` like this ? – dreamweiver May 07 '13 at 13:05
  • Not sure I understand, but, the values you mentioned are Zurb defaults. I'd like to change them, I don't know how though as setting them on ol does not seem to work, setting them on li doesn't seem to work either. – Marcin Raczkowski May 07 '13 at 13:07
  • ya i know its default values, i`m not seeing the code where you are overriding default values.btw have you included `foundation.cookie.js` ? – dreamweiver May 07 '13 at 13:15
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/29539/discussion-between-dreamweiver-and-marcin-raczkowski) – dreamweiver May 07 '13 at 13:15

0 Answers0