diff --git a/bower.json b/bower.json index b323a82..afc3e1f 100644 --- a/bower.json +++ b/bower.json @@ -6,10 +6,10 @@ "gfranko " ], "dependencies": { - "jquery": "~1.9.1", - "jquery-ui": "~1.10.3" + "jquery": "~3.5.1", + "jquery-ui": "~1.12.1" }, "description": "A jQuery plugin that dynamically generates a table of contents.", "main": "jquery.tocify.js", "license": "MIT" -} \ No newline at end of file +} diff --git a/package.json b/package.json index 51b4760..e506882 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "jquery.tocify", "title": "jquery Tocify", "description": "A jQuery plugin that creates a dynamic table of contents", - "version": "1.9.0", + "version": "1.9.1", "homepage": "http://gregfranko.com/jquery.tocify.js/", "author": { "name": "Greg Franko", @@ -28,4 +28,4 @@ "grunt-contrib-jshint": "~0.3.0" }, "keywords": ["jQuery", "jQueryUI", "Twitter Bootstrap", "Table of Contents Plugin"] -} \ No newline at end of file +} diff --git a/src/javascripts/jquery.tocify.js b/src/javascripts/jquery.tocify.js index f464d95..ee86eba 100644 --- a/src/javascripts/jquery.tocify.js +++ b/src/javascripts/jquery.tocify.js @@ -176,8 +176,7 @@ self._setEventHandlers(); // Binding to the Window load event to make sure the correct scrollTop is calculated - $(window).load(function() { - + $(window).on("load", function() { // Sets the active TOC item self._setActiveElement(true); @@ -319,12 +318,12 @@ elem.addClass(self.focusClass); // If the showAndHide option is true - if(self.options.showAndHide) { + // if(self.options.showAndHide) { // Triggers the click event on the currently focused TOC item elem.click(); - } + // } } diff --git a/src/javascripts/jquery.tocify.min.js b/src/javascripts/jquery.tocify.min.js deleted file mode 100644 index 0fc0442..0000000 --- a/src/javascripts/jquery.tocify.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jquery.tocify - v1.9.0 - 2013-10-01 -* http://gregfranko.com/jquery.tocify.js/ -* Copyright (c) 2013 Greg Franko; Licensed MIT*/ -(function(e){"use strict";e(window.jQuery,window,document)})(function(e,t,s){"use strict";var i="tocify",o="tocify-focus",n="tocify-hover",a="tocify-hide",l="tocify-header",h="."+l,r="tocify-subheader",d="."+r,c="tocify-item",f="."+c,u="tocify-extend-page",p="."+u;e.widget("toc.tocify",{version:"1.9.0",options:{context:"body",ignoreSelector:null,selectors:"h1, h2, h3",showAndHide:!0,showEffect:"slideDown",showEffectSpeed:"medium",hideEffect:"slideUp",hideEffectSpeed:"medium",smoothScroll:!0,smoothScrollSpeed:"medium",scrollTo:0,showAndHideOnScroll:!0,highlightOnScroll:!0,highlightOffset:40,theme:"bootstrap",extendPage:!0,extendPageOffset:100,history:!0,scrollHistory:!1,hashGenerator:"compact",highlightDefault:!0},_create:function(){var s=this;s.extendPageScroll=!0,s.items=[],s._generateToc(),s._addCSSClasses(),s.webkit=function(){for(var e in t)if(e&&-1!==e.toLowerCase().indexOf("webkit"))return!0;return!1}(),s._setEventHandlers(),e(t).load(function(){s._setActiveElement(!0),e("html, body").promise().done(function(){setTimeout(function(){s.extendPageScroll=!1},0)})})},_generateToc:function(){var t,s,o=this,n=o.options.ignoreSelector;return t=-1!==this.options.selectors.indexOf(",")?e(this.options.context).find(this.options.selectors.replace(/ /g,"").substr(0,this.options.selectors.indexOf(","))):e(this.options.context).find(this.options.selectors.replace(/ /g,"")),t.length?(o.element.addClass(i),t.each(function(t){e(this).is(n)||(s=e("