I have a multi-tab subscription form. You can click back and forth in this form.
For dropdowns, I use jquery to pre-select the previous selection, so people donβt need to re-answer this specific question when clicking on it back.
This script is great for Chrome and Firefox, however for Safari it doesn't work at all. Somehow I just can't get this to work.
Can you look at him and say what I'm doing wrong?
script:
if (repeat_visit !== '') { $('#repeatVisit').find('option').each(function(){ if ($(this).val() === repeat_visit) { $(this).attr('selected','selected'); } }); }
The attribute is set to a parameter so that it looks like this: Yes
I see this happening, but it seems that Safari doesn't change the page when the selected attribute is added after the page loads. Therefore, I need to call this change event.
source share