rivkamak
asked on
jquery wizard in IE
I have a jquery wizard with a few steps and I set it up with a code when you hit the next button it adds a # to the url so if the user pushes the back button, the page doesn't go back a whole page, but just the step The code works in chrome , but not in IE.
http://www.kars4kids.org/ppc/brand.asp
is there a known problem or a fix i an use for this?
http://www.kars4kids.org/ppc/brand.asp
is there a known problem or a fix i an use for this?
ASKER
I need this code to clear my error fields.
What does it have to be to be validated?
What does it have to be to be validated?
$("#form1").on("keyup", ".error-redInput", function() {
if( $.trim($(this).val()).length > 0 ) {
$(this).removeClass("error-redInput");
}
});
$("#form1").on("keyup", ".error-redSelect", function() {
if( $.trim($(this).val()).length > 0 ) {
$(this).removeClass("error-redSelect");
}
});
Simply move
HTH
Rainer
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
right after<meta charset="utf-8">
so that it is the first referenced JavaScript file.HTH
Rainer
And therefore it is loaded before the cartype.js.
ASKER
so the concept works that the back button doesn't go back a page and stays on the same page, but it doesn't bring it back on the step they were up to like it does work on chrome.
why do you still have jquery after cartype.js?
RainerJ asked you to put it before
RainerJ asked you to put it before
ASKER
I moved it down, and it's not helping the situation,.
The goal was to moving jQuery up and let it at this place to see what happen now
ASKER
jquery is the top of the page also.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
caniuse says that pushstate should work in IE 10 and 11, but this code isn't working there either.
that work fine on my IE11 and IE8 (clicking on the green button and click on IE brower back button)
ASKER
the page doesn't go back a step in the wizard
the issue is that in the file "cartype.js" you have in the middle between functions the usage of the jQuery shortcut "$" to bind events to the form keyup
Open in new window
But you load the jQuery file ways later.Solution:
Put the jQuery reference as first entry (of all JavaScript file refs) in the head section of your page.
HTH
Rainer