Fixed a bug (another jQuery related *shocked*) and removed some bad language against jQuery (woops)
Showing
2 changed files
with
1 additions
and
7 deletions
| 1 | // Lines of code vs jQuery: +30ish | ||
| 2 | // Performance gain: Yes | ||
| 3 | // Time tanken vs jQuery implementation: substantially less | ||
| 4 | // Does it work: Fuck yes (jQuery didn't, dear jQuery: LEARN TO CLONE PROPERLY!) | ||
| 5 | // Native JavaScript: Tried, tested and true! | ||
| 6 | |||
| 7 | var MenuWidget = function() { | 1 | var MenuWidget = function() { |
| 8 | var init = function(e) { | 2 | var init = function(e) { |
| 9 | jQuery(document).ajaxSuccess(doLinks); | 3 | jQuery(document).ajaxSuccess(doLinks); | ... | ... |
| ... | @@ -4,7 +4,7 @@ class MenuWidget extends WP_Widget { | ... | @@ -4,7 +4,7 @@ class MenuWidget extends WP_Widget { |
| 4 | register_widget(__CLASS__); | 4 | register_widget(__CLASS__); |
| 5 | 5 | ||
| 6 | if (is_admin()) { | 6 | if (is_admin()) { |
| 7 | _enqueue_script('tz-menu-widget', plugins_url('MenuWidget.js', __FILE__), Array('addEvent','jQuery')); | 7 | _enqueue_script('tz-menu-widget', plugins_url('MenuWidget.js', __FILE__), Array('addEvent')); |
| 8 | } | 8 | } |
| 9 | } | 9 | } |
| 10 | 10 | ... | ... |
-
Please register or sign in to post a comment