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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2010
    Location
    Sutton-in-ashfield, Notts
    Posts
    117
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Exclamation jQuery no conflict trouble

    I currently have to run jQuery.noConflict(); so my other scripts work correctly, examples:
    Code:
    prototype.js
    validation.js
    And i have this

    Code:
    $( document ).ready( function() {
    $( window ).scroll( function( e ) {
    if( $( window ).scrollTop() > 160 ) {
    $( '.navigation' ).addClass( 'fixed' );
    } else {
    $( '.navigation' ).removeClass( 'fixed' );
    }
    } );
    } );
    witch works when i take jQuery.noConflict(); out, but with it in it dont work and thats my main feature is there anyway round it, thanks.

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    if you jsut added , then it is nto going to work, you have to either then use "jQuery" instead of "$" or assign a new chracter to initilize jquery functions.

    go here: http://docs.jquery.com/Using_jQuery_...ther_Libraries

    read the section labeled: OVERRIDING THE $-FUNCTION

  • Users who have thanked DanInMa for this post:

    Idfk (01-21-2012)

  • #3
    Regular Coder
    Join Date
    Jun 2010
    Location
    Sutton-in-ashfield, Notts
    Posts
    117
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Thankyou very much.


  •  

    Posting Permissions

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