Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery 1.9.0 and newer, tray-button does not appear any more #185

Open
lewie opened this issue Aug 22, 2014 · 1 comment
Open

jQuery 1.9.0 and newer, tray-button does not appear any more #185

lewie opened this issue Aug 22, 2014 · 1 comment

Comments

@lewie
Copy link

lewie commented Aug 22, 2014

Does not find the Error.
Does anyone have a solution?

@lewie
Copy link
Author

lewie commented Aug 23, 2014

since jQuery 1.9 toggle function is removed. Threfore we have to write own and replace toggle in supersized.shutter.js:

Before theme Object in supersized.shutter.js Line 16:
// REPLACEMENT for .toggle since jQuery 1.9
// place this before all of your code, outside of document ready.
// EXAMLPE: http://jsfiddle.net/2f8nZ/
/*
function odd() {
alert("odd");
}
function even() {
alert("even");
}
$("#mydiv").clicktoggle(even, odd);
*/
// https://forum.jquery.com/topic/beginner-function-toggle-deprecated-what-to-use-instead
$.fn.clicktoggle = function(a, b) {
return this.each(function() {
var clicked = false;
$(this).click(function() {
if (clicked) {
clicked = false;
return b.apply(this, arguments);
}
clicked = true;
return a.apply(this, arguments);
});
});
}

In Line 41 replace 'toggle' with 'clicktoggle'.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant