<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to load JavaScript in WordPress plugins</title>
	<atom:link href="http://noteslog.com/post/how-to-load-javascript-in-wordpress-plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://noteslog.com/post/how-to-load-javascript-in-wordpress-plugins/</link>
	<description></description>
	<lastBuildDate>Mon, 15 Mar 2010 01:07:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Artem</title>
		<link>http://noteslog.com/post/how-to-load-javascript-in-wordpress-plugins/comment-page-1/#comment-42740</link>
		<dc:creator>Artem</dc:creator>
		<pubDate>Sun, 03 Jan 2010 18:14:57 +0000</pubDate>
		<guid isPermaLink="false">http://noteslog.com/?p=205#comment-42740</guid>
		<description>If I were to keep both functions inside a class, how would I apply the filter to the array if I would call it from my constructor?

This doesnt work. Its saying its missing an argument, obviously.
add_filter(&#039;print_scripts_array&#039;, $this-&gt;jquery_no_conflict_follows_jquery());</description>
		<content:encoded><![CDATA[<p>If I were to keep both functions inside a class, how would I apply the filter to the array if I would call it from my constructor?</p>
<p>This doesnt work. Its saying its missing an argument, obviously.<br />
add_filter(&#8216;print_scripts_array&#8217;, $this-&gt;jquery_no_conflict_follows_jquery());</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dizi izle</title>
		<link>http://noteslog.com/post/how-to-load-javascript-in-wordpress-plugins/comment-page-1/#comment-40644</link>
		<dc:creator>Dizi izle</dc:creator>
		<pubDate>Sun, 04 Oct 2009 14:34:50 +0000</pubDate>
		<guid isPermaLink="false">http://noteslog.com/?p=205#comment-40644</guid>
		<description>can somebody please tell me if there’s a way to check if a script has been registered?
at a certain point in the php code i have to do - in pseudo code -
if !registered(”mootools”) echo “”
thanks for any help</description>
		<content:encoded><![CDATA[<p>can somebody please tell me if there’s a way to check if a script has been registered?<br />
at a certain point in the php code i have to do &#8211; in pseudo code -<br />
if !registered(”mootools”) echo “”<br />
thanks for any help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Osman Titiz</title>
		<link>http://noteslog.com/post/how-to-load-javascript-in-wordpress-plugins/comment-page-1/#comment-39941</link>
		<dc:creator>Osman Titiz</dc:creator>
		<pubDate>Thu, 03 Sep 2009 09:51:24 +0000</pubDate>
		<guid isPermaLink="false">http://noteslog.com/?p=205#comment-39941</guid>
		<description>Hello, I searched a lot but I couldn&#039;t find any solution :( I have problems when I try to load jquery. I have been developing a widget and I need to load my own jquery because I use jquery.cycle.all.min.v.2.65.js and it needs to jQuery v1.2.6. 
The problems are
- when I load the widget in wordpress-2.5, 2.6 my widget doesn&#039;t work because jquery version is older (although written v1.2.6, it doesnt work)
So, I must load my own jquery, It worked but now there is another problem which if theme or plugin has loaded jquery, my widget doesn&#039;t work because of crash(reloading jquery)
I used noconflict and also I tried to load jquery by doing  but they didn&#039;t solve my problem. Do you have any idea what should I do? Thanks.. :)

1.
wp_enqueue_script(&#039;iyikidogdun_jquery&#039;, $src = &#039;/wp-content/plugins/iyikidogdun/jquery_iyikidogdun.js&#039;, $ver = &#039;1.3.2_iyikidogdun&#039; );
wp_enqueue_script(&#039;jquery.cycle.iyikidogdun&#039;,&#039;/wp-content/plugins/iyikidogdun/jquery.cycle.all.min.v.2.65.js&#039;,array(&#039;iyikidogdun_jquery&#039;),$ver = &#039;2.65_iyikidogdun&#039;);


2.(loading before $before_widget but although has been loaded,my widget doesn&#039;t work)
</description>
		<content:encoded><![CDATA[<p>Hello, I searched a lot but I couldn&#8217;t find any solution :( I have problems when I try to load jquery. I have been developing a widget and I need to load my own jquery because I use jquery.cycle.all.min.v.2.65.js and it needs to jQuery v1.2.6.<br />
The problems are<br />
- when I load the widget in wordpress-2.5, 2.6 my widget doesn&#8217;t work because jquery version is older (although written v1.2.6, it doesnt work)<br />
So, I must load my own jquery, It worked but now there is another problem which if theme or plugin has loaded jquery, my widget doesn&#8217;t work because of crash(reloading jquery)<br />
I used noconflict and also I tried to load jquery by doing  but they didn&#8217;t solve my problem. Do you have any idea what should I do? Thanks.. :)</p>
<p>1.<br />
wp_enqueue_script(&#8216;iyikidogdun_jquery&#8217;, $src = &#8216;/wp-content/plugins/iyikidogdun/jquery_iyikidogdun.js&#8217;, $ver = &#8216;1.3.2_iyikidogdun&#8217; );<br />
wp_enqueue_script(&#8216;jquery.cycle.iyikidogdun&#8217;,'/wp-content/plugins/iyikidogdun/jquery.cycle.all.min.v.2.65.js&#8217;,array(&#8216;iyikidogdun_jquery&#8217;),$ver = &#8216;2.65_iyikidogdun&#8217;);</p>
<p>2.(loading before $before_widget but although has been loaded,my widget doesn&#8217;t work)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Notes Log » How to load JavaScript in WordPress plugins &#124; Squico</title>
		<link>http://noteslog.com/post/how-to-load-javascript-in-wordpress-plugins/comment-page-1/#comment-39371</link>
		<dc:creator>Notes Log » How to load JavaScript in WordPress plugins &#124; Squico</dc:creator>
		<pubDate>Tue, 18 Aug 2009 02:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://noteslog.com/?p=205#comment-39371</guid>
		<description>[...] In: Wordpress plugins  18 Aug 2009         Go to Source [...]</description>
		<content:encoded><![CDATA[<p>[...] In: Wordpress plugins  18 Aug 2009         Go to Source [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blutarsky</title>
		<link>http://noteslog.com/post/how-to-load-javascript-in-wordpress-plugins/comment-page-1/#comment-39299</link>
		<dc:creator>Blutarsky</dc:creator>
		<pubDate>Fri, 14 Aug 2009 08:00:46 +0000</pubDate>
		<guid isPermaLink="false">http://noteslog.com/?p=205#comment-39299</guid>
		<description>I am experiencing a little problem when using jQuery to inject contents in a Worpdress page.

Basically I&#039;m using an external php file, that holds the code to create content being injected. The external file is called topposts.php.

If the file is included via php (using include, or require) it works perfectly, but when loaded using JQuery an error is issued, with a &quot;call to undefined function&quot;.

It looks like jQuery load is executed in such a way it doesn&#039;t &quot;see&quot; Wordpress at all.

Code:

&#039;In index.php
.
.
.

.
.
.
.

		jQuery.noConflict();
		jQuery(&quot;#foo&quot;).load(&quot;/wp-content/themes/tgv1/topposts.php&quot;, &quot;&quot;,
			function(responseText, textStatus, XMLHttpRequest) {
				if(textStatus == &#039;error&#039;) {
					jQuery(&#039;#foo&#039;).html(&#039;There was an error making the AJAX request&#039;);
				}});
&#039;

then

&#039;in topposts.php
&#039;

Any idea?</description>
		<content:encoded><![CDATA[<p>I am experiencing a little problem when using jQuery to inject contents in a Worpdress page.</p>
<p>Basically I&#8217;m using an external php file, that holds the code to create content being injected. The external file is called topposts.php.</p>
<p>If the file is included via php (using include, or require) it works perfectly, but when loaded using JQuery an error is issued, with a &#8220;call to undefined function&#8221;.</p>
<p>It looks like jQuery load is executed in such a way it doesn&#8217;t &#8220;see&#8221; Wordpress at all.</p>
<p>Code:</p>
<p>&#8216;In index.php<br />
.<br />
.<br />
.</p>
<p>.<br />
.<br />
.<br />
.</p>
<p>		jQuery.noConflict();<br />
		jQuery(&#8220;#foo&#8221;).load(&#8220;/wp-content/themes/tgv1/topposts.php&#8221;, &#8220;&#8221;,<br />
			function(responseText, textStatus, XMLHttpRequest) {<br />
				if(textStatus == &#8216;error&#8217;) {<br />
					jQuery(&#8216;#foo&#8217;).html(&#8216;There was an error making the AJAX request&#8217;);<br />
				}});<br />
&#8216;</p>
<p>then</p>
<p>&#8216;in topposts.php<br />
&#8216;</p>
<p>Any idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A brother ;)</title>
		<link>http://noteslog.com/post/how-to-load-javascript-in-wordpress-plugins/comment-page-1/#comment-38870</link>
		<dc:creator>A brother ;)</dc:creator>
		<pubDate>Fri, 31 Jul 2009 13:49:26 +0000</pubDate>
		<guid isPermaLink="false">http://noteslog.com/?p=205#comment-38870</guid>
		<description>Thanks,I have searched a lot to manage loading &quot;jquery&quot;(conflict problem),I&#039;ll try this. Second in second textarea  function name &quot;load_with_api()&quot; must be &quot;myOwnTheme_init()&quot; ;)</description>
		<content:encoded><![CDATA[<p>Thanks,I have searched a lot to manage loading &#8220;jquery&#8221;(conflict problem),I&#8217;ll try this. Second in second textarea  function name &#8220;load_with_api()&#8221; must be &#8220;myOwnTheme_init()&#8221; ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chinmoy</title>
		<link>http://noteslog.com/post/how-to-load-javascript-in-wordpress-plugins/comment-page-1/#comment-38312</link>
		<dc:creator>chinmoy</dc:creator>
		<pubDate>Thu, 09 Jul 2009 18:49:59 +0000</pubDate>
		<guid isPermaLink="false">http://noteslog.com/?p=205#comment-38312</guid>
		<description>I have the jquery js in my site but it does not load during the site load!!! Dont remember if I did any optimization.</description>
		<content:encoded><![CDATA[<p>I have the jquery js in my site but it does not load during the site load!!! Dont remember if I did any optimization.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: indy</title>
		<link>http://noteslog.com/post/how-to-load-javascript-in-wordpress-plugins/comment-page-1/#comment-36607</link>
		<dc:creator>indy</dc:creator>
		<pubDate>Thu, 21 May 2009 12:32:39 +0000</pubDate>
		<guid isPermaLink="false">http://noteslog.com/?p=205#comment-36607</guid>
		<description>can somebody please tell me if there&#039;s a way to check if a script has been registered?
at a certain point in the php code i have to do - in pseudo code -
if !registered(&quot;mootools&quot;) echo &quot;&lt;script src=&#039;mootools.js&#039;&gt;&lt;/script&gt;&quot;
thanks for any help</description>
		<content:encoded><![CDATA[<p>can somebody please tell me if there&#8217;s a way to check if a script has been registered?<br />
at a certain point in the php code i have to do &#8211; in pseudo code -<br />
if !registered(&#8220;mootools&#8221;) echo &#8220;&lt;script src=&#8217;mootools.js&#8217;&gt;&lt;/script&gt;&#8221;<br />
thanks for any help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://noteslog.com/post/how-to-load-javascript-in-wordpress-plugins/comment-page-1/#comment-36030</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Tue, 21 Apr 2009 05:46:48 +0000</pubDate>
		<guid isPermaLink="false">http://noteslog.com/?p=205#comment-36030</guid>
		<description>Sorry, I mean instead of a .js file</description>
		<content:encoded><![CDATA[<p>Sorry, I mean instead of a .js file</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://noteslog.com/post/how-to-load-javascript-in-wordpress-plugins/comment-page-1/#comment-36029</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Tue, 21 Apr 2009 05:44:10 +0000</pubDate>
		<guid isPermaLink="false">http://noteslog.com/?p=205#comment-36029</guid>
		<description>Does anyone know how to add javascript code rather than a javascript file?</description>
		<content:encoded><![CDATA[<p>Does anyone know how to add javascript code rather than a javascript file?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
