Prevent default event on JavaScript-only links
These links point to "#" and don't do anything without JavaScript activated, and they were causing the browser to scroll to the top of the page.
This commit is contained in:
@@ -28,8 +28,10 @@
|
||||
editor.find("textarea").on("scroll", function() {
|
||||
editor.find(".markdown-preview").scrollTop($(this).scrollTop());
|
||||
});
|
||||
editor.find(".fullscreen-toggle").on("click", function() {
|
||||
editor.find(".fullscreen-toggle").on("click", function(e) {
|
||||
var span;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
editor.toggleClass("fullscreen");
|
||||
$(".fullscreen-container").toggleClass("medium-8", "medium-12");
|
||||
span = $(this).find("span");
|
||||
|
||||
Reference in New Issue
Block a user