Ben's Sandbox
  • Projects
  • Tags

jQuery UI Demo (Part 3) - Proxy Overrides


View Blog   View Source  
This example shows how to proxy the $.Widget._setOption function to intercept option changes to Draggable and Resizable. Since there's no way to prevent these calls from being made on an element after ColorBox is created, we want to ensure the options we set are no overidden. Addtionally, stopImmediatePropagation() is used in the dragstop event to prevent other handlers from being called that might affect the custom handling that ColorBox is providing. This demo is referenced in several of my blog posts related to the jQuery UI Widget series at BenKnowsCode.wordpress.com

© Ben Olson 2012 with help from Jekyll Bootstrap and Twitter Bootstrap