Skip to content

Instantly share code, notes, and snippets.

@tjvantoll
Created August 19, 2013 12:29
Show Gist options
  • Save tjvantoll/6268602 to your computer and use it in GitHub Desktop.
Save tjvantoll/6268602 to your computer and use it in GitHub Desktop.
activate event docs update
diff --git a/entries/accordion.xml b/entries/accordion.xml
index dc66356..9b7ed64 100644
--- a/entries/accordion.xml
+++ b/entries/accordion.xml
@@ -120,7 +120,10 @@
</options>
<events>
<event name="activate">
- <desc>Triggered after a panel has been activated (after animation completes). If the accordion was previously collapsed, <code>ui.oldHeader</code> and <code>ui.oldPanel</code> will be empty jQuery objects. If the accordion is collapsing, <code>ui.newHeader</code> and <code>ui.newPanel</code> will be empty jQuery objects.</desc>
+ <desc>
+ <p>Triggered after a panel has been activated (after animation completes). If the accordion was previously collapsed, <code>ui.oldHeader</code> and <code>ui.oldPanel</code> will be empty jQuery objects. If the accordion is collapsing, <code>ui.newHeader</code> and <code>ui.newPanel</code> will be empty jQuery objects.</p>
+ <div class="warning"><strong>Note:</strong> Since the <code>activate</code> event is only fired on panel activation, it is not fired for the initial panel when the accordion widget is created. If you need a hook for widget creation use the <a href="#event-create"><code>create</code></a> event.</div>
+ </desc>
<argument name="event" type="Event"/>
<argument name="ui" type="Object">
<property name="newHeader" type="jQuery">
diff --git a/entries/tabs.xml b/entries/tabs.xml
index 1fd0f55..2d98c31 100644
--- a/entries/tabs.xml
+++ b/entries/tabs.xml
@@ -100,7 +100,10 @@
</options>
<events>
<event name="activate">
- <desc>Triggered after a tab has been activated (after animation completes). If the tabs were previously collapsed, <code>ui.oldTab</code> and <code>ui.oldPanel</code> will be empty jQuery objects. If the tabs are collapsing, <code>ui.newTab</code> and <code>ui.newPanel</code> will be empty jQuery objects.</desc>
+ <desc>
+ <p>Triggered after a tab has been activated (after animation completes). If the tabs were previously collapsed, <code>ui.oldTab</code> and <code>ui.oldPanel</code> will be empty jQuery objects. If the tabs are collapsing, <code>ui.newTab</code> and <code>ui.newPanel</code> will be empty jQuery objects.</p>
+ <div class="warning"><strong>Note:</strong> Since the <code>activate</code> event is only fired on tab activation, it is not fired for the initial tab when the tabs widget is created. If you need a hook for widget creation use the <a href="#event-create"><code>create</code></a> event.</div>
+ </desc>
<argument name="event" type="Event"/>
<argument name="ui" type="Object">
<property name="newTab" type="jQuery">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment