I'm having an issue with the mobile navigation when using Zurb Foundation framework. In my HTML document the back link is working just fine but when I put the HTML into my CMS (Concrete5) the back link just make the page jump to the top of the page. I'm not getting any JS errors or any leads to fix this issue. Has anyone else ran into this issue? I'm a bit lost at how to fix it.
You can try with a simple HTML button such as:
back
And the appropriate JS:
<script>
$('#history-go-back').click(function(event) {
event.preventDefault();
return history.back();
});
</script>
Should work.
I guess that in your case, the event which is normally attached to your button click is not triggered, so it's acting as a link and going on the top of the page. Maybe you may have missed some JS files in your HTML?
Related
I have a particular problem on a site that I'm working on and can't seem to get things working on Wordpress. I have a tab section of the site that uses # to function properly. I also have anchor links to these sections as well. Everything works great, but when I navigate off of the page and click the browser back button, I have to click through each # until I get to the root page. I realize that this is the normal browser behavior, but need to find a workaround if possible. I've tried all sorts of code, and could post some things I've tried but nothing is working thus far. Any help would be greatly appreciated.
Thanks so much
I love the elegance of iziModal.js and I would like to switch to it on my website. However, during tests I'm having problems opening the modal. Everything works as it should except that the overlay opens on top of the modal window. Ive tried to fiddle with the css and the js but cannot make it happen. The only way you can interact with the modal window is by using "overlay: false" or change "zindex:" to a very high number like 9999999999999999999999999 both options opening the modal without overlay.
Can you help with this issue, please?
Example can be seen on
https://squareplate.co.uk/3
The website is still in development :)
Scroll down to the "Report error" and "Claim listing" area and click on the "modal" link to see it in action.
Florin, Thank you for your feedback. This and other improvements you find in the next update of iziModal (v1.5.0). I promise it will be soon.
Managed to fix it by enclosing the whole website content in a div with id body between <body> and </body> and change the iziModal.js from
that.$overlay.appendTo('body'); to that.$overlay.appendTo('#body');
Now everything works great...
I have a website prototype https://arcane-beyond-35849.herokuapp.com/
I have a strange bug. In internet explorer v11.
please go to the site and press new button.
You will see this picture...
Then you can reload the page and see this...
I use the jQuery steps wizard.
So I have no idea why the first time everything breaks.
(If you need a code I can provide it just tell me.)
$(".myform").steps({
*some stuff and options
});
Okay I found another weird behavior when you go to the main page and try to click on the menu button in the right top corner nothing happens.
When you reload a page and click menu button again side menu appears.
I simply on document.ready use something like this :
$('.somebutton').click(function(){});
I guess I should provide code and I will do it as soon as get to another laptop. But if take away all business logic The code is as simple as I described.
In google chrome everything works normal.
Can someone help? Seems like my JavaScript code just doesn't execute.
Update:
okay guys Console give me some errors. My IE11 not in English so no point to post exact errors here.
There is something about the content that is loaded over http when I have https.
But it's just a placeholder picture. So I don't know. And when I reload page my JavaScript code works. So this is strange.
I know this is sort of a please debug my code question, but I really don't know whats going on here.
I just added the content to this page and now none of the external or internal links will work (eg you click on them and nothing happens). The Mega menu drop down works fine and I can click on links on it, but the links in the text dont work, and neither do any on the sidebars
Here is the page that is causing the problems
http://www.cookingisfun.ie/cookery-courses/course-details/101618/Guest-Chef-Diana-Kennedy-at-Kerrygold-Ballymaloe-Litfest
here is a similar page that has no issue.
http://www.cookingisfun.ie/cookery-courses/course-details/101364/Guest-Chef-Lilly-Higgins
I can click the Back to CourseList button which I Can't on the first.
This is not just a problem with my machine, I have tried from another machine and an Iphone with same result.
I can't see any javascript errors but I assume it is something to do with the plugin that marks the links as external though that plugin works elsewhere on my site.
Any suggestions?
I guess you have some errors in your HTML code (wrong nesting of tags or something or you did not close a tag right). If I want to inspect the "Back to course button" with Firefox I get the following
It seems that the #content-blocks div is empty. Also the source code view of your page underlines me some tags red:
Normally this means that there are some HTML errors. Here the output of the HTML validator: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.cookingisfun.ie%2Fcookery-courses%2Fcourse-details%2F101618%2FGuest-Chef-Diana-Kennedy-at-Kerrygold-Ballymaloe-Litfest&charset=%28detect+automatically%29&doctype=Inline&group=0
I'm building this site julebord.bedriftsdesign.no and implemented animated scroll on this page: http://julebord.bedriftsdesign.no/julebord.html
Now this is the problem. When I use an internal anchor link like (#myanchor) the animated scroll works fine. But if the link is formatted like this http://julebord.bedriftsdesign.no/julebord.html#myanchor It won't work.
I need both to work but am a bit at a loss on how. I'm guessing something has to be changed in the javascript i use right?
Would appreciate any input on this. Thanks
I think it won't work with your current script because the scroll is triggered by a click not a page load.
You could detect the URL hash on the page load and then manually trigger the click, which would then trigger the scroll.
You could do something like (this isn't tested in your page so it might need some tweaking)
if(window.location.hash) {
$('a[href="#'+window.location.hash.substr(1)+'"]').trigger('click');
}