这里是一个选项后检索插件使用option()方法称为例:
//Executes your code when the DOM is ready. Acts the same as $(document).ready(). $(function() { //Calls the tocify method on your HTML div var toc = $("#toc").tocify().data("toc-tocify"); // Writes the showEffect option to the console console.log(toc.option("showEffect")); });这里是检索所有当前选项的插件后利用期权特性称为例:
//Executes your code when the DOM is ready. Acts the same as $(document).ready(). $(function() { //Calls the selectBoxIt method on your HTML select box var toc = $("#toc").tocify().data("toc-tocify"); // Writes all of the current plugin options to the console console.log(toc.options); });