]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Use pull request #11110 from DanielRuf/docs/javascript-update-destroy-method-name...
authorDaniel Ruf <daniel@daniel-ruf.de>
Sat, 16 Jun 2018 07:49:43 +0000 (09:49 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Sat, 16 Jun 2018 20:58:48 +0000 (22:58 +0200)
41813bf7b docs: update the destroy method name on the JavaScript page

Signed-off-by: Nicolas Coden <nicolas@ncoden.fr>
docs/pages/drilldown-menu.md
docs/pages/javascript.md

index 39c2a87a6133441f6da90cf3edb085be353052a1..79bc9f41c707c8b79d7956a70a48df61ebc53dce 100644 (file)
@@ -90,7 +90,7 @@ Any `<a>` without a submenu will function like a normal link.
 
 <div class="secondary callout">
   <p>If you like to set the height to auto you can also set the autoHeight and animateHeight params</p>
-  <button class="button expanded" onclick="$('#m3').foundation('destroy');if($('#m3').data('autoHeight')){$('#m3').data('autoHeight',false);$(this).html('autoHeight is Off');}else{$('#m3').data('autoHeight',true);$(this).html('autoHeight is On');}new Foundation.Drilldown($('#m3'));return false;">autoHeight is On</button>
+  <button class="button expanded" onclick="$('#m3').foundation('_destroy');if($('#m3').data('autoHeight')){$('#m3').data('autoHeight',false);$(this).html('autoHeight is Off');}else{$('#m3').data('autoHeight',true);$(this).html('autoHeight is On');}new Foundation.Drilldown($('#m3'));return false;">autoHeight is On</button>
 </div>
 
 <p>
index c96f72edf144ca00d794fe746ae2dbed3590dfde..23b483c856c1042afabac1d2e1d61bacda2225de 100644 (file)
@@ -191,7 +191,7 @@ $('#reveal').foundation('open'); //will open a Reveal modal with id `reveal`.
 
 $('[data-tabs]').eq(0).foundation('selectTab', $('#example')); //will change the first Tabs on the page to whatever panel you choose.
 
-$('.tooltip').foundation('destroy'); //will destroy all Tooltips on the page.
+$('.tooltip').foundation('_destroy'); //will destroy all Tooltips on the page.
 
 ```
 You can use any jQuery selector you like, and if the selector encompasses multiple plugins, they will all have the same the chosen method invoked. You pass arguments just like you would any in other JavaScript `function(comma, delimited, so, easy)`. We did make an effort to reduce the number of public methods that require arguments, but check the plugin's page to see if it requires additional information.