Web Development with jQuery®
Writing a Plugin (^) ❘ 251 Enable Context Menu</ span> Open Save Save As... Edit The preceding XHTML 5 document ...
(^252) ❘ CHAPTER 9 PLUGINS border: 1px solid rgb(150, 150, 150); border: 1px solid rgba(150, 150, 150, 0.95); padding: 4px 0 ; b ...
Writing a Plugin (^) ❘ 253 background: -ms-linear-gradient(top, rgb(82, 117, 243) 0%, rgb(3, 57, 242) 100%); / W3C / background: ...
(^254) ❘ CHAPTER 9 PLUGINS { x = self.innerWidth; y = self.innerHeight; } else if (document.documentElement && document. ...
Writing a Plugin (^) ❘ 255 .bind( 'mouseout.contextMenu', function() { $(this).data('contextMenu', false); } ); this.parents('.c ...
(^256) ❘ CHAPTER 9 PLUGINS event.pageX + 'px' ); } } ); } if (!$('body').data('contextMenu')) { $('body').data('contextMenu', tr ...
Writing a Plugin (^) ❘ 257 $('span#applicationContextMenuDisable').click( function(event) { $('div#applicationContextMenu').cont ...
(^258) ❘ CHAPTER 9 PLUGINS If you press Disable Context Menu, you should see the default context menu instead. My default contex ...
Writing a Plugin (^) ❘ 259 The fi rst chunk of code (preceding this sentence) provides support for passing in some options. To d ...
(^260) ❘ CHAPTER 9 PLUGINS { x = document.body.clientWidth; y = document.body.clientHeight; } return { x : x, y : y }; } The dim ...
Writing a Plugin (^) ❘ 261 element, except those with contextMenuDisabled and contextMenuSeparator (fi ltered out using not()) c ...
(^262) ❘ CHAPTER 9 PLUGINS click occurs while the mouse cursor isn’t on top of the context menu, the context menu will be hidden ...
Writing a Plugin (^) ❘ 263 { contextMenu.css( 'right', (viewport.x - event.pageX) + 'px' ); } else { contextMenu.css( 'left', ev ...
(^264) ❘ CHAPTER 9 PLUGINS A mousedown event, again namespaced with the name contextMenu, is attached to the document. Whenever ...
Summary (^) ❘ 265 $(document).unbind('mousedown.contextMenu'); } In this block of code, events are removed and data is set to fa ...
(^266) ❘ CHAPTER 9 PLUGINS EXERCISES What method do you use to add a plugin to jQuery? How do you list all the plugins in use w ...
Scrollbars jQuery provides functionality to interact with scrollable DOM elements. As discussed in the preceding chapter, plugin ...
(^268) ❘ CHAPTER 10 SCROLLBARS Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ...
Getting the Position of a Scrollbar (^) ❘ 269 } div.filler { margin: 10px; padding: 5px; width: 400px; height: 150px; background ...
(^270) ❘ CHAPTER 10 SCROLLBARS The markup in this example is straightforward. The scrollable content is contained in the elemen ...
«
10
11
12
13
14
15
16
17
18
19
»
Free download pdf