I’m getting 'Uncaught TypeError: Undefined is not a function at this point in code
$(this).addClass("active").rotate({
I had a google and play arounf…read it may be not parsed html…tried putting this into a document.ready function, but no joy…full code below… Once ok I’ll later combine the rotate to width check and blind…
Thanks for any pointers
<script>
$(".step-arrow").click(function(event) {
var win_w = window.innerWidth;
var myTarget = $(this).data("target");
if($(this).hasClass("active")) {
$(this).removeClass("active").rotate({
duration: 200,
angle: 180,
animateTo:1
});
} else {
$(this).addClass("active").rotate({
duration: 200,
angle: 0,
animateTo:180});
};
if (win_w > 820 && win_w <1000){
// $(this).toggleClass("rotate");
$(myTarget).toggle("blind", {direction: "horizontal"}, 1000);
}
else {
$(myTarget).toggle("blind", {direction: "vertical"}, 1000);
}
});
</script>