Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get jQuery UI to work from a Firefox extension
    text
    copied!<p>I've tried to engage with the jquery and jquery ui communities (email list, irc), in addition to Google and more experienced coworkers, but nothing has proved fruitful. I've found stackoverflow useful in the past, so perhaps someone will have encountered this before.</p> <p>My problem is this: I want to include jQuery UI in my extension. </p> <p>This isn't as simple as in self served page scripts because I need to provide a specific context to the ui widgets.</p> <p>jQuery can be initialized with a specific context. jQuery UI cannot. Thus, I wrapped the UI code with a function that takes in the correctly contextualized jQuery instance.</p> <p>PROBLEM: whenever UI code creates a jQuery instance, eg $(""), <strong>this.element</strong> is overwritten to be that newly created element. </p> <p>this.element is supposed to be, for instance, the slider div. When the slider widget initialization creates the handle div, this.element is still supposed to be the slider div, not the handle....appending the handle to itself correctly raises an error.</p> <p>the "this" in the widgets might be messed up...jQuery UI or jQuery might refer to itself directly somewhere, and thus the contextualized jQuery I'm providing isn't getting used everywhere...jQuery UI might not be re-entrant or something of that sort... I have no idea.</p> <p>I would be super grateful for any help you can provide. I've been learning a lot from debugging this problem....but I'm definitely ready to get this working and move on already.</p> <p>The post I made to jQUery UI's mailing list includes relevant code snippets <a href="http://groups.google.com/group/jquery-ui/browse_thread/thread/a79537053acff3f8" rel="nofollow noreferrer">http://groups.google.com/group/jquery-ui/browse_thread/thread/a79537053acff3f8</a></p> <p>ps - Let's say we can't fix this problem. What would you do? Right now I just want to get sliders to work. Not sure about the future, eg effects? datepicker?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload