Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-20-2012, 06:26 PM   PM User | #1
Idfk
Regular Coder

 
Join Date: Jun 2010
Location: Sutton-in-ashfield, Notts
Posts: 117
Thanks: 7
Thanked 0 Times in 0 Posts
Idfk has a little shameless behaviour in the past
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.
__________________
Idfk is offline   Reply With Quote
Old 01-20-2012, 07:03 PM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
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
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Users who have thanked DanInMa for this post:
Idfk (01-21-2012)
Old 01-21-2012, 09:08 AM   PM User | #3
Idfk
Regular Coder

 
Join Date: Jun 2010
Location: Sutton-in-ashfield, Notts
Posts: 117
Thanks: 7
Thanked 0 Times in 0 Posts
Idfk has a little shameless behaviour in the past
Thankyou very much.
__________________
Idfk is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:17 AM.


Advertisement
Log in to turn off these ads.