View Single Post
Old 02-18-2013, 09:49 AM   PM User | #1
cf_member
New to the CF scene

 
Join Date: Jun 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
cf_member is an unknown quantity at this point
Exclamation My jQuery noConflicts won't work

Hi
I have a problem. I have 4 jquerry effects from my page website.
One for lightbox, one for sliding image btn from right side of
my page, one accordion effects, and one tweets using with jQuery.
Now I've tested on which does my twitter conflicts of the 3 scripts.
Then I found that it is from my lightbox. Now I'm working with lightbox
and tweets that would not be conflict.

In my lightbox, i have this line
Code:
<script type="text/javascript">
	$.noConflict();
	jQuery(document).ready(function($){
    $(function() {
		$('.pasko a').lightBox();
		$('.gallery a').lightBox();
        $('.area a').lightBox();
		$('.picture a').lightBox();
		$('.interior a').lightBox();
		$('.floorplan a').lightBox();
    });
	})(jQuery);	
    </script>
And my tweets is
Code:
<script type='text/javascript'>									
jQuery(function($){
   jQuery(".tweet").tweet({
	avatar_size: 0,
	count: 1,
        username: "neovistahomes",
	template: "{text}  {retweet_action}"
	});
}).bind("loaded", function(){
	jQuery(this).find("a.tweet_action").click(function(ev) {
	window.open(this.href, "Retweet",
																	'menubar=0,resizable=0,width=550,height=420,top=200,left=400');
	ev.preventDefault();
	});
}); 
</script> 
	<div class="tweet"></div>
And now my question is, how do i make that the two scripts would not
be conflict. ? Any suggest or any idea how?

Last edited by cf_member; 02-18-2013 at 09:51 AM..
cf_member is offline   Reply With Quote