I've made a page for a client and I initially was working in Chrome and forgot to check if it was working in Firefox. Now, I have a big problem because the whole page is based upon a script that doesn't work in Firefox.
It's based on all "links" that have a rel
that leads to hiding and showing the right page. I don't understand why this isn't working in Firefox.
For instance pages have the id #menuPage
, #aboutPage
and so on. All links have this code:
<a class="menuOption" rel='#homePage' href="#">Velkommen</a>
It's working perfectly in Chrome and Safari.
Here is the code:
$(document).ready(function(){
//Main Navigation
$('.menuOption').click(function(){
event.preventDefault();
var categories = $(this).attr('rel');
$('.pages').hide();
$(categories).fadeIn();
});
// HIDES and showes the right starting menu
$('.all').hide();
$('.pizza').show();
// Hides and shows using rel tags in the buttons
$('.menyCat').click(function(event){
event.preventDefault();
var categori = $(this).attr('rel');
$('.all').hide();
$(categori).fadeIn();
$('html,body').scrollTo(0, categori);
});
});