I am using the jquery-ui-1.8.16.custom.min.js lib... to toggle my
sidebar-views

======
..
$('.toggle-view li').click(function () {
var text = $(this).children('p');
if (text.is(':hidden')) {
text.slideDown('fast');
$(this).children('h4').addClass('active');
} else {
text.slideUp('fast');
$(this).children('h4').removeClass('active');
}
});
...
======

I have a strange behavior : without any pre-compilation ( rake
assets:clean ) it runs well... toggle is good
then I pre-compile locally my assets before deployment
running again in development ... toggle doesn't work anymore .. it
slideDown and slideUp immediately

if I clear again the assets : rake assets:clean , then correct
toggle behavior is good again ..

what could happen when I run : bundle exec rake
assets:precompile:all to make this happen ?

thanks for your feedback


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Colin Law at Jan 9, 2012 at 12:12 pm

    On 9 January 2012 12:02, Erwin wrote:
    I am using the jquery-ui-1.8.16.custom.min.js lib...  to toggle my
    sidebar-views

    ======
    ..
    $('.toggle-view li').click(function () {
    var text = $(this).children('p');
    if (text.is(':hidden')) {
    text.slideDown('fast');
    $(this).children('h4').addClass('active');
    } else {
    text.slideUp('fast');
    $(this).children('h4').removeClass('active');
    }
    });
    ...
    ======

    I have a strange behavior  :   without any pre-compilation  ( rake
    assets:clean )  it runs well... toggle is good
    then I pre-compile locally my assets before deployment
    running again in development ...  toggle doesn't work anymore ..  it
    slideDown and slideUp immediately

    if I clear again the assets  : rake assets:clean , then  correct
    toggle behavior is good again ..

    what could happen when I run :  bundle exec rake
    assets:precompile:all   to make this happen ?
    I wonder whether you have an error in the script that behaves
    differently when compiled. First run with firebug in firefox with it
    not compiled and see if there are any errors. Then repeat with it
    compiled.

    Colin

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Ankit Varshney at Jan 11, 2012 at 7:32 am
    Use jquery-rails gem this will solve your issue and also maintain your
    update related to jquery

    Thanks & Regards
    Ankit Varshney

    On Mon, Jan 9, 2012 at 5:41 PM, Colin Law wrote:
    On 9 January 2012 12:02, Erwin wrote:
    I am using the jquery-ui-1.8.16.custom.min.js lib... to toggle my
    sidebar-views

    ======
    ..
    $('.toggle-view li').click(function () {
    var text = $(this).children('p');
    if (text.is(':hidden')) {
    text.slideDown('fast');
    $(this).children('h4').addClass('active');
    } else {
    text.slideUp('fast');
    $(this).children('h4').removeClass('active');
    }
    });
    ...
    ======

    I have a strange behavior : without any pre-compilation ( rake
    assets:clean ) it runs well... toggle is good
    then I pre-compile locally my assets before deployment
    running again in development ... toggle doesn't work anymore .. it
    slideDown and slideUp immediately

    if I clear again the assets : rake assets:clean , then correct
    toggle behavior is good again ..

    what could happen when I run : bundle exec rake
    assets:precompile:all to make this happen ?
    I wonder whether you have an error in the script that behaves
    differently when compiled. First run with firebug in firefox with it
    not compiled and see if there are any errors. Then repeat with it
    compiled.

    Colin

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 9, '12 at 12:02p
activeJan 11, '12 at 7:32a
posts3
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase