Behavior.Startup help how does it work?

13 views
Skip to first unread message

Rolf-nl

unread,
Dec 1, 2012, 12:07:11 PM12/1/12
to clien...@googlegroups.com
#moostillrockin'

I thought with Behavior.Startup I could trigger delegators on startup (doh) reading https://github.com/anutron/behavior/blob/master/Docs/Behavior.Startup.md

But I think I don't understand it, even though it looks obvious from the code/docs.

Let's say I have a delegator called Booya and some links on a page are decorated with this one.. like:
...
<li>
  <p>foo</p>
  <div><img><img><img></div>
  <a href="#" data-trigger="Booya" data-booya-target="!li > div">booya</a>
</li>

I thought by adding the Startup behavior to one of the 'a' elements I could invoke the Booya delegator automagically, as if the 'a' element was clicked.
No?

<a href="#" data-trigger="Booya" data-booya-target="!li > div" data-behavior="startup" data-startup-options="{
  'delegators': {
      'target': 'self',
      'delay': 1000
    }
  }">booya</a>

?

Aaron Newton

unread,
Dec 1, 2012, 12:16:51 PM12/1/12
to clien...@googlegroups.com
You have to specify which delegator to trigger.

delegators: {
  booya: { target: self, etc }
}


--
You received this message because you are subscribed to the Google Groups "Clientcide" group.
To view this discussion on the web visit https://groups.google.com/d/msg/clientside/-/3F0w8YOcW_QJ.
To post to this group, send email to clien...@googlegroups.com.
To unsubscribe from this group, send email to clientside+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/clientside?hl=en.

Rolf-nl

unread,
Dec 3, 2012, 3:53:47 PM12/3/12
to clien...@googlegroups.com
ah yes, that would be a typo in my post, because I thought I tried it like that. But I will double check with a clean test and then compare with this project. thx
Reply all
Reply to author
Forward
0 new messages