Hello all,
I seem to be running into an issue where jquery seems to be working fine in my development environment but when I load it to my production environment it does not work. There are some menus that I am trying to hide when the web page loads but when they page loads they are there in plain site. When I launch firebug and run the same code in console it works without any issue so I have wonder if there is a different way I need to precompile the assets to get everything to load?
Here is what my environment is like:
Rails Version: 3.2.3 Ruby Version: 1.9.3 (RVM)
Gemfile … gem ‘jquery-rails’, ‘~> 2.0.1’ …
app/assets/javascripts/application.js … //= require jquery //= require jquery_ujs //= require_tree .
app/assets/javascripts/custom.js $(function(){ $(‘#roles_menu’).hide(); $(‘#issues_menu’).hide(); $(‘#features_menu’).hide(); $(‘#roles_menu_link’).click( function(){ if($(‘#roles_menu’).is(‘:hidden’)){ $(‘#roles_menu’).slideDown(‘slow’); // $(‘#roles_menu_link’).html(“hide roles menu”); } else{ $(‘#roles_menu’).slideUp(‘slow’); // $(‘#roles_menu_link’).html(“show roles menu”); } });
$('#issues_menu_link').click(
function(){
if($('#issues_menu').is(':hidden')){
$('#issues_menu').slideDown('slow');
// $('#issues_menu_link').html("<a href='#' id='issues_menu_link'>hide issues menu</a>");
} else{
$('#issues_menu').slideUp('slow');
// $('#issues_menu_link').html("<a href='#' id='issues_menu_link'>show issues menu</a>");
}
});
$('#features_menu_link').click(
function(){
if($('#features_menu').is(':hidden')){
$('#features_menu').slideDown('slow');
// $('#features_menu_link').html("<a href='#' id='features_menu_link'>hide features menu</a>");
} else{
$('#features_menu').slideUp('slow');
// $('#features_menu_link').html("<a href='#' id='features_menu_link'>show features menu</a>");
}
});
});