Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong><em>Short answer:</em></strong> Yes</p> <p><strong><em>Long Answer:</em></strong></p> <p>I experimented with it myself. I could only use it in a limited way. Manipulation of XUL elements is possible. But I am having a hard time observing events, since I am pretty new to jQuery - I don't know how to tweak it to observe events at Firefox/XUL level - I don't even know whether tweaking is required :D</p> <p><strong><em>Example:</em></strong></p> <p><strong>overlay.xul</strong></p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;?xml-stylesheet href="chrome://testaddon/content/overlay.css" type="text/css"?&gt; &lt;overlay id="testaddon_overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"&gt; &lt;script type="application/x-javascript" src="chrome://testaddon/content/jquery-1.4.2.js" /&gt; &lt;script type="application/x-javascript" src="chrome://testaddon/content/overlay.js" /&gt; &lt;toolbox id="navigator-toolbox"&gt; &lt;toolbar toolbarname="TestAddonToolbar" class="chromeclass-toolbar"&gt; &lt;toolbaritem&gt; &lt;toolbarbutton id="btnHide" label="HideMe" onclick="hideMe();" /&gt; &lt;/toolbaritem&gt; &lt;/toolbar&gt; &lt;/toolbox&gt; &lt;/overlay&gt; </code></pre> <p><strong>overlay.js</strong></p> <pre><code>function hideMe() { $('#btnHide').hide(); } </code></pre> <p>Above code will hide the button when you click on it - basic XUL manipulation with jQuery!</p> <p>But as I said, try to observe document load and other such events and it gets complicated very quickly (or I don't know much :D).</p> <p><strong>Update:</strong> I tried some effects. Effects.fadeIn() works - but since the transparency properties are set differently in XUL when compared to HTML, the button stays there and in the end, it abruptly disappears. Now it is becoming clear to what extent we can (can't) use jQuery to manipulate XUL.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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