开发者

Is it possible to write jQuery inside XUL file?

开发者 https://www.devze.com 2023-04-08 19:53 出处:网络
I want to use jQuery for my XUL files. Generally I use XUL Explorer to create and text each page individually & it\'s really to use script blocks inside the XUL files like this:

I want to use jQuery for my XUL files. Generally I use XUL Explorer to create and text each page individually & it's really to use script blocks inside the XUL files like this:

We can write scripts inside script blocks in XUL file itself.

 <script type="application/x-javascript">
    <![CDATA[
        // your code here
    ]]>
开发者_如何学Go    </script>

or

<script>
</script>

To use jQuery we have to link the files like this:

<script type="application/x-javascript" src="chrome://axead/content/jquery.js" />
 <script type="application/javascript" src="chrome://myapp/content/js/jquery-1.4.4.min.js"/>

I use XUL Explorer a lot to create & test XUL files using JavaScript but when I started using XUL files with jQuery in XUL Explorer isn't working. I referred this thread/post: Is it possible to use jQuery to manipulate XUL elements?

Is there any way to use/write jQuery inside XUL file?

0

精彩评论

暂无评论...
验证码 换一张
取 消