Skip to content

Commit

Permalink
jQuery does not like shortcuts anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 14, 2016
1 parent 06bb833 commit f60dafc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

6.65 2016-06-13
6.65 2016-06-14
- Updated jQuery to version 3.0.0.
- Fixed "0" value bug in Mojo::UserAgent::CookieJar. (jamadam)

Expand Down
6 changes: 3 additions & 3 deletions lib/Mojolicious/resources/templates/mojo/debug.html.ep
Expand Up @@ -132,15 +132,15 @@
%= include 'mojo/menubar'
<script>
function mojoDrawer (handle, drawer) {
$(handle).click(function () {
$(handle).on('click', function () {
$(drawer).slideToggle('slow');
var text = $(handle + ' div.tap').text();
text = text == "tap for more" ? "tap for less" : "tap for more";
$(handle + ' div.tap').text(text);
});
$(drawer).toggle();
}
$(document).ready(function () {
$(function () {
mojoDrawer('#trace', '#frames');
mojoDrawer('#more', '#infos');
});
Expand Down Expand Up @@ -195,7 +195,7 @@
<script>
var current = '#context';
function mojoShowcase () {
$('#showcase').click(function () {
$('#showcase').on('click', function () {
$(this).unbind('click');
$(current).slideToggle('slow', function () {
current = current == '#context' ? '#insight' : '#context';
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojolicious/resources/templates/mojo/menubar.html.ep
Expand Up @@ -91,15 +91,15 @@
$('html, body').animate({scrollTop: offset.top - mojobarHeight}, 1);
}
}
$(window).load(function () {
$(window).on('load', function () {
if (window.location.hash) {
fixOffset();
}
var start = mojobar.offset().top;
var fixed;
var lastScrollTop = start;
var hidden = mojobarHeight + 1;
$(window).scroll(function () {
$(window).on('scroll', function () {
var st = $(window).scrollTop();
if (fixed) {
if (st <= start) {
Expand All @@ -126,8 +126,8 @@
}
});
});
$(document).ready(function () {
$('a[href^="#"]').addClass('​mojoscroll').click(function (e) {
$(function () {
$('a[href^="#"]').addClass('​mojoscroll').on('click', function (e) {
e.preventDefault();
e.stopPropagation();
var hash = '#' + this.href.split('#')[1];
Expand Down

0 comments on commit f60dafc

Please sign in to comment.