0

in my case I want to add the 'div1' class to the 'div2' class but I don't really know how to do it. I tested a code but after the else part, the code doesn't execute (just the append method not other function like alert()...), is there any syntax error for the Magento logic

this is error in console :

require.js:166 Uncaught Error: Mismatched anonymous define() module: function($){
    "use strict";
    return function myfunctionCheck()
    {
        //code
    }
     else {
        //code
    }
    }
}
8
  • the error seems unrelated with your custom jquery code
    – fmsthird
    Dec 23, 2020 at 13:09
  • what happens if you remove your custom jquery code? will the error also gone?
    – fmsthird
    Dec 23, 2020 at 13:10
  • all of them ? or juste the append line
    – coding mv
    Dec 23, 2020 at 13:30
  • yeah all the custom codes
    – fmsthird
    Dec 23, 2020 at 13:46
  • the same error when i refresh the page
    – coding mv
    Dec 23, 2020 at 13:50

1 Answer 1

1

Try this into your code part and you can increase and decrease time

setTimeout(function() {
    $(".div1").insertAfter($(".div2"));
}, 3000);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.