File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change 66
66
* https://github.com/kamens/jQuery-menu-aim
67
67
*/
68
68
( function ( $ ) {
69
+
69
70
$ . fn . menuAim = function ( opts ) {
71
+ // Initialize menu-aim for all elements in jQuery collection
72
+ this . each ( function ( ) {
73
+ init . call ( this , opts ) ;
74
+ } ) ;
75
+
76
+ return this ;
77
+ } ;
70
78
79
+ function init ( opts ) {
71
80
var $menu = $ ( this ) ,
72
81
activeRow = null ,
73
82
mouseLocs = [ ] ,
248
257
/**
249
258
* Hook up initial menu events
250
259
*/
251
- var init = function ( ) {
252
- $menu
253
- . mouseleave ( mouseleaveMenu )
254
- . find ( options . rowSelector )
255
- . mouseenter ( mouseenterRow )
256
- . mouseleave ( mouseleaveRow ) ;
257
-
258
- $ ( document ) . mousemove ( mousemoveDocument ) ;
259
- } ;
260
+ $menu
261
+ . mouseleave ( mouseleaveMenu )
262
+ . find ( options . rowSelector )
263
+ . mouseenter ( mouseenterRow )
264
+ . mouseleave ( mouseleaveRow ) ;
265
+ $ ( document ) . mousemove ( mousemoveDocument ) ;
260
266
261
- init ( ) ;
262
- return this ;
263
267
} ;
264
268
} ) ( jQuery ) ;
265
269
You can’t perform that action at this time.
0 commit comments