Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2012
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,727
    Thanks
    6
    Thanked 1,013 Times in 986 Posts
    Well, it seems like you haven’t quite understood the noConflict function. But there is no way to give you a solution to your problem without seeing the entire HTML (i. e. the way how you are including/referencing the scripts). Maybe case two in my carefully written sticky applies to you?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •