开发者

rails jquery slider and textile editor conflict

开发者 https://www.devze.com 2022-12-29 23:57 出处:网络
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.

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 t开发者_运维百科he text with formats. i use the following plungin from http://github.com/ryanfelton/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


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!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号