views:

92

answers:

1

hello!

i have a conflict between different jquery parts. i have a rails app and in there i have an internal area where admins can administrate the whole page and for that i put in a textile editor. outside i created a jquery slider for nicer overview.

myTitle <%= javascript_include_tag 'jquery-1.4.2'%> <%= javascript_include_tag 'jquery.localscroll'%> <%= javascript_include_tag 'jquery.scrollTo'%> <%= javascript_include_tag 'jquery.serialScroll'%> <%= javascript_include_tag 'category_pages_slider' %> <%= stylesheet_link_tag 'app' %>

now my problem.. the slider works, but in the textile part there is no bar where i can handle the text with formats. i use the following plungin from http://github.com/felttippin/textile-editor-helper/blob/master/README

can somebody help me? i modified the textile part with textile_editor_initialize(:framework => :jquery) for using jquery instead of prototype.

mattherick

A: 

Not that it is recommended to use both Prototype and JQuery on the same page, but sometimes there is a need for it.

After you load the jquery library you can prevent it from conflicting with prototype by using:

jQuery.noConflict();

Then change your jQuery functions from this:

$("#sliderdiv").slider();

to

jQuery("#sliderdiv").slider();

Of course, I am guessing at the slider syntax, but you get the picture.:)

Good luck!

Dustin M.
i don´t use prototype and jquery on the same page. i removed the standardt prototype and changed the textile plugin to jquery.. so both is jquery and there is a conflict between both jquery parts.. normally couldn´t be i thought?
Thats odd, it is possible that one of your plugins was built for jQuery 1.3.2 and the other for the new jQuery 1.4.2? That would be the only reason I could see there would be conflict. The other possibility is that you have duplicate ID's have you tried validating the generate HTML?
Dustin M.
i validated the generate html..no duplicated id´s...annoying!i just made the steps descripted on github (http://github.com/felttippin/textile-editor-helper).. same errors..
Have you taken a look at Firebug? I use that to catch any javascript errors, admittedly it doesn't always catch jQuery mis-assignments, but it is worth a shot. If you have a semi-public url I can take a look at the code and see what I can find.
Dustin M.
tried firebug, no errors displayed. i have not deployed this part yet...so it´s just on my working copy, not in the net yet..