#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Posts
    767
    Rep Power
    41

    Different jQuery.js cause different problems


    Hi, I subcontracted a programmer who replaced my jquery.js with a different version of jquery. His version breaks my function, but my version breaks the layout.
    I have a function that works with
    Code:
    jquery.tools.min.js
    but not with
    Code:
    jquery.js?ver=1.4.2

    Here's is my function:
    Code:
    <SCRIPT type="text/javascript">
    $(document).ready(function(){
          $('.theVideoLink').click(function(e){
                e.preventDefault();
                $('#VideoContent').load($(this).attr('href'));
          });
    });
    </script>
    I need this code to work with
    Code:
    jquery.js?ver=1.4.2
    but it doesn't. it works with
    Code:
    jquery.tools.min.js
    but this jquery.tools.min.js breaks the layout in IE7&8.
    Can anyone help?

    thanks
    Last edited by lelales; July 17th, 2010 at 07:08 PM. Reason: typo
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Posts
    767
    Rep Power
    41

    current site


    You can see the current site here :

    It works in all browsers except IE7&8.

    thanks

    Comments on this post

    • codeJ disagrees : i cant find the page
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Posts
    767
    Rep Power
    41

    I had to replace $ with jQuery


    I replaced $ with jQuery and now it works.

    thanks
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2008
    Posts
    369
    Rep Power
    58
    If you initiate the jQuery object in the following way, you can still use $ as a alias.

    Code:
    jQuery(document).ready(function($) { 
           $(selector).....
    });
    There is also noConflict() mode, but in my opinion the above code easier.

IMN logo majestic logo threadwatch logo seochat tools logo