Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
e9a070c8
authored
2009-07-29 21:21:32 +0000
by
Chris Boden
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fixed a bug (another jQuery related *shocked*) and removed some bad language against jQuery (woops)
1 parent
e52abefd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
7 deletions
MenuWidget.js
MenuWidget.php
MenuWidget.js
View file @
e9a070c
// Lines of code vs jQuery: +30ish
// Performance gain: Yes
// Time tanken vs jQuery implementation: substantially less
// Does it work: Fuck yes (jQuery didn't, dear jQuery: LEARN TO CLONE PROPERLY!)
// Native JavaScript: Tried, tested and true!
var
MenuWidget
=
function
()
{
var
init
=
function
(
e
)
{
jQuery
(
document
).
ajaxSuccess
(
doLinks
);
...
...
MenuWidget.php
View file @
e9a070c
...
...
@@ -4,7 +4,7 @@ class MenuWidget extends WP_Widget {
register_widget
(
__CLASS__
);
if
(
is_admin
())
{
_enqueue_script
(
'tz-menu-widget'
,
plugins_url
(
'MenuWidget.js'
,
__FILE__
),
Array
(
'addEvent'
,
'jQuery'
));
_enqueue_script
(
'tz-menu-widget'
,
plugins_url
(
'MenuWidget.js'
,
__FILE__
),
Array
(
'addEvent'
));
}
}
...
...
Please
register
or
sign in
to post a comment