Question

I populated the dropdown with the help of array. for example I have array with elements (ali,abid,naqvi).

Problem.....

when I clear the cache and reload the page. and first time I am unable to select first value which is "ali". but if after cache clear and page reload, I select "abid" or "naqvi" first time and then select "ali" it work fine.

in short...after page reload I cann't select first value of dropdown unless I select other values first.

Was it helpful?

Solution

Actually problem was that I was using "onchange" function. When I used "onclick" it was working fine and also select the first value from drop too.like I was using

$('.pro_size').on('change', function(event){

after modification

$('.pro_size').on('click', function(event){ =>worked fine

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top