Website in development www.inside.leebartelme.com
Please don't ask they why, but I am running a site using pushstate and popstate to change the URL so the user never has to reload the page. Everything has worked on all browsers I have tested, even my iPod touch. However there is an issue on the iPad.
All the page works perfect on the iPad except the initial load. In a browser I do a check to find out which URL the user is at and hide/show the correct items. It fails to hide anything, it shows all the "content windows" if you will. I don't know, but I assume the problem lies here. This is the code that checks the URL and sets variables and things based on the page the landed on.
Like I said, after I get here on the iPad I can click the various buttons on the nav bar (if you do them fast enough one after the other two at a time I can get it back to only having one open). So I know all my code works, but something about the initial setup part doesn't work.Code:if (window.location.href == 'http://www.inside.leebartelme.com/') { homebox = true; portSlide.hide(); aboutSlide.hide(); blogSlide.hide(); contSlide.hide(); $('leftarrow').setStyle('opacity', '0.0'); $('rightarrow').setStyle('opacity', '0.0'); } if (window.location.href == 'http://www.inside.leebartelme.com/about/') { aboutbox = true; portSlide.hide(); homeSlide.hide(); blogSlide.hide(); contSlide.hide(); bodybg.setStyle('background-color', '#444444'); } if (window.location.href == 'http://www.inside.leebartelme.com/portfolio/') { portbox = true; aboutSlide.hide(); homeSlide.hide(); blogSlide.hide(); contSlide.hide(); bodybg.setStyle('background-color', '#942b2b'); $('leftarrow').setStyle('opacity', '0.0'); $('rightarrow').setStyle('opacity', '0.0'); }
I would just hide all the sliders by default and then use a .show() command but I can't get that to work properly. Any help would be great.


Reply With Quote

Bookmarks