<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<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">
	<channel>
		<title>Support Forum - Topic: Choices jquery error</title>
		<link>http://www.kriesi.at/support/topic/choices-jquery-error</link>
		<description>Support Forum - Topic: Choices jquery error</description>
		<language>en-US</language>
		<pubDate>Thu, 20 Jun 2013 00:45:48 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.kriesi.at/support/search.php</link>
		</textInput>
		<atom:link href="http://www.kriesi.at/support/rss/topic/choices-jquery-error" rel="self" type="application/rss+xml" />

		<item>
			<title>Dude on "Choices jquery error"</title>
			<link>http://www.kriesi.at/support/topic/choices-jquery-error#post-70844</link>
			<pubDate>Mon, 13 Aug 2012 19:57:18 +0000</pubDate>
			<dc:creator>Dude</dc:creator>
			<guid isPermaLink="false">70844@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hey! &#60;/p&#62;
&#60;p&#62; Yes, the reason is that Kriesi uses the noconflict mode: &#60;a href=&#34;http://api.jquery.com/jQuery.noConflict/&#34; rel=&#34;nofollow&#34;&#62;http://api.jquery.com/jQuery.noConflict/&#60;/a&#62; &#60;/p&#62;
&#60;p&#62; Best regards,&#60;br /&#62;
Peter
&#60;/p&#62;</description>
		</item>
		<item>
			<title>andreigavrila on "Choices jquery error"</title>
			<link>http://www.kriesi.at/support/topic/choices-jquery-error#post-70779</link>
			<pubDate>Mon, 13 Aug 2012 12:54:38 +0000</pubDate>
			<dc:creator>andreigavrila</dc:creator>
			<guid isPermaLink="false">70779@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Thanks for the input.&#60;br /&#62;
We also have some problems when using $ instead of jQuery.&#60;br /&#62;
Could you please tell me if you know why ? &#60;/p&#62;
&#60;p&#62;This call works: &#60;code&#62;jQuery(&#38;#39;video,audio&#38;#39;).mediaelementplayer(/* Options */);&#60;/code&#62;&#60;br /&#62;
This one returns an error: &#60;code&#62;$(&#38;#39;video,audio&#38;#39;).mediaelementplayer(/* Options */);&#60;/code&#62;&#60;br /&#62;
The error message is Uncaught TypeError: Property '$' of object [object Window] is not a function.&#60;/p&#62;
&#60;p&#62;If we remove the references to&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script type=&#38;#39;text/javascript&#38;#39; src=&#38;#39;/Content/themes/choices/js/avia.js&#38;#39;&#38;gt;&#38;lt;/script&#38;gt;
&#38;lt;script type=&#38;quot;text/javascript&#38;quot; src=&#38;quot;Content/themes/choices/js/avia_styleswitch.js&#38;quot;&#38;gt;&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;$ works properly.&#60;/p&#62;
&#60;p&#62;Could you please tell me why this happens. We are pretty concerned now on using the avia framework, since other frameworks that we use might use $ and might get broken.&#60;/p&#62;
&#60;p&#62;Thank you
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Dude on "Choices jquery error"</title>
			<link>http://www.kriesi.at/support/topic/choices-jquery-error#post-70208</link>
			<pubDate>Thu, 09 Aug 2012 09:01:21 +0000</pubDate>
			<dc:creator>Dude</dc:creator>
			<guid isPermaLink="false">70208@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;1) Try following code instead:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;(function($){
    $.fn.alertconfirm = function(options){

        var defaults = {
            hide: false
        };

        var options = $.extend(defaults, options);

        if(options.hide == true)
        {
            alert(&#38;#39;confirm hide&#38;#39;);
        }
        else
        {
            alert(&#38;#39;confirm&#38;#39;);
        }
    }
})(jQuery);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You should be able to call the alert box with following code now:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;jQuery(&#38;#39;a&#38;#39;).on( &#38;#39;click&#38;#39;, alertconfirm({ hide: false }) );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;jQuery(&#38;#39;a&#38;#39;).on( &#38;#39;click&#38;#39;, alertconfirm({ hide: true }) );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Update: I think this is not a clever solution anyway because there's already a default confirm() function in js. Thus you can create the same effect with eg following code:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function confirmcheck()
{
    var answer = confirm(&#38;quot;Do you really want to hide the element?&#38;quot;);
    if (answer){
        return true;
    }
else
{
    return false;
}

}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and call this function like:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;jQuery(&#38;#39;a&#38;#39;).on( &#38;#39;click&#38;#39;, confirmcheck() );&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Ismael on "Choices jquery error"</title>
			<link>http://www.kriesi.at/support/topic/choices-jquery-error#post-70199</link>
			<pubDate>Thu, 09 Aug 2012 08:17:29 +0000</pubDate>
			<dc:creator>Ismael</dc:creator>
			<guid isPermaLink="false">70199@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hi Andrei Gavrila,&#60;/p&#62;
&#60;p&#62;I'm not sure how to fix it. Let me tag Peter to check this issue. :)&#60;/p&#62;
&#60;p&#62;Regards,&#60;br /&#62;
Ismael
&#60;/p&#62;</description>
		</item>
		<item>
			<title>andreigavrila on "Choices jquery error"</title>
			<link>http://www.kriesi.at/support/topic/choices-jquery-error#post-69989</link>
			<pubDate>Wed, 08 Aug 2012 12:34:56 +0000</pubDate>
			<dc:creator>andreigavrila</dc:creator>
			<guid isPermaLink="false">69989@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I added a new jquery framework to display confirmation messages in the choices theme and I get an error&#60;/p&#62;
&#60;p&#62;Here is the script that I added (to reproduce the problem)&#60;/p&#62;
&#60;p&#62;(function($){&#60;/p&#62;
&#60;p&#62;	$.confirm = function(){&#60;br /&#62;
	    alert('confirm');&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	$.confirm.hide = function(){&#60;br /&#62;
	    alert('confirm hide');&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;})(jQuery);&#60;/p&#62;
&#60;p&#62;Each time I call $.confirm() I get an error that the confirm method does not exist.&#60;/p&#62;
&#60;p&#62;If I remove the references to&#60;br /&#62;
&#38;lt;script type='text/javascript' src='/Content/themes/choices/js/avia.js'&#38;gt;&#38;lt;/script&#38;gt;&#60;br /&#62;
&#38;lt;script type=&#34;text/javascript&#34;  src=&#34;Content/themes/choices/js/avia_styleswitch.js&#34;&#38;gt;&#38;lt;/script&#38;gt;&#60;br /&#62;
My confirm method works just fine.&#60;br /&#62;
So my guess is that the avia framework does something to jquery, so that other components cannot register extension methods&#60;/p&#62;
&#60;p&#62;Do you know what it might be ?&#60;br /&#62;
If the question is not clear, I will try to elaborate, let me know.&#60;/p&#62;
&#60;p&#62;Thank you,&#60;br /&#62;
Andrei Gavrila
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
