<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<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>Gravity Support Forums Topic: AJAX disrupting my jQuery function?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/ajax-disrupting-my-jquery-function</link>
		<description>Gravity Support Forums Topic: AJAX disrupting my jQuery function?</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 09:38:52 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/ajax-disrupting-my-jquery-function" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "AJAX disrupting my jQuery function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/ajax-disrupting-my-jquery-function#post-70154</link>
			<pubDate>Wed, 08 Aug 2012 11:33:02 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">70154@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for the update John.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>byjc on "AJAX disrupting my jQuery function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/ajax-disrupting-my-jquery-function#post-70142</link>
			<pubDate>Wed, 08 Aug 2012 10:44:55 +0000</pubDate>
			<dc:creator>byjc</dc:creator>
			<guid isPermaLink="false">70142@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Working perfectly now. Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "AJAX disrupting my jQuery function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/ajax-disrupting-my-jquery-function#post-68618</link>
			<pubDate>Mon, 30 Jul 2012 15:03:24 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">68618@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi John,&#60;/p&#62;
&#60;p&#62;You're going to want to look into using the jQuery &#34;on&#34; function. On the initial page load you bind your functions to the elements that currently exist. After the form is submitted via ajax, the original elements are removed and replaced by new elements from the submitted form. These elements will have the same IDs, but the events are no longer bound to them. By using the &#34;on&#34; function, you can bind to events for elements that exist now and in the future.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[js]
$(document).on(&#38;quot;click&#38;quot;, &#38;quot;a.offsite&#38;quot;, function(){ alert(&#38;quot;Goodbye!&#38;quot;); });&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You can find more info on this with the below links:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://api.jquery.com/on/&#34; rel=&#34;nofollow&#34;&#62;http://api.jquery.com/on/&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://api.jquery.com/live/&#34; rel=&#34;nofollow&#34;&#62;http://api.jquery.com/live/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "AJAX disrupting my jQuery function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/ajax-disrupting-my-jquery-function#post-68580</link>
			<pubDate>Mon, 30 Jul 2012 12:47:36 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">68580@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you for that information.  I've asked one of the developers for assistance and either he or I will post here with some assistance.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "AJAX disrupting my jQuery function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/ajax-disrupting-my-jquery-function#post-68405</link>
			<pubDate>Sun, 29 Jul 2012 01:55:00 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">68405@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You can email me at &#60;a href=&#34;mailto:chris@rocketgenius.com&#34;&#62;chris@rocketgenius.com&#60;/a&#62; and I will give it a look.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>byjc on "AJAX disrupting my jQuery function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/ajax-disrupting-my-jquery-function#post-68206</link>
			<pubDate>Fri, 27 Jul 2012 10:13:37 +0000</pubDate>
			<dc:creator>byjc</dc:creator>
			<guid isPermaLink="false">68206@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Chris,&#60;/p&#62;
&#60;p&#62;Thanks for the reply. It's in a password protected area on a dev site, so I can't post it here. Where can I email that too?&#60;/p&#62;
&#60;p&#62;If I turn off AJAX in the shortcode (using do_shortcode), the page just reloads and the thanks message with a further call to action isn't visible, because it's in the hidden div.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "AJAX disrupting my jQuery function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/ajax-disrupting-my-jquery-function#post-68153</link>
			<pubDate>Thu, 26 Jul 2012 23:06:20 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">68153@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you share a link to the page with your form on it, so we can take a look? Thanks.&#60;/p&#62;
&#60;p&#62;If you turn off AJAX in the shortcode or function call, does everything work as expected?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>byjc on "AJAX disrupting my jQuery function?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/ajax-disrupting-my-jquery-function#post-68107</link>
			<pubDate>Thu, 26 Jul 2012 17:17:21 +0000</pubDate>
			<dc:creator>byjc</dc:creator>
			<guid isPermaLink="false">68107@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have a form that is hidden when the page loads, but displayed with an addClass function:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;jQuery(&#38;quot;.talk-button&#38;quot;).click(function () {
	jQuery(&#38;quot;#lets-talk&#38;quot;).addClass(&#38;#39;on&#38;#39;);
});&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This is working properly, as is a cancel button added as an html element in the form that hides the div again:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;jQuery(&#38;quot;.talk-cancel&#38;quot;).click(function () {
	jQuery(&#38;quot;#lets-talk&#38;quot;).removeClass(&#38;#39;on&#38;#39;);
});&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The form is submitted with AJAX and the notification that is displayed also shows a button with the .talk-cancel class, but that button isn't properly closing the window. I don't see any errors in my dev console. &#60;/p&#62;
&#60;p&#62;Any thoughts on why the AJAX form submit might be preventing my .removeClass function from working properly?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
