I want to use the code here https://codepen.io/SitePoint/pen/mGgDf. But I want to make default Option 1 displayed(instead of Make a Selection) with its content while hiding others. How can I do this? I have deleted Make a Selection which is the default(so far so good) and then Option 1 appears as default but its content remains hidden.How can make the content of Option 1 displayed in default(when page is opened or browser is refreshed)?
$('.jqueryOptions').hide(); $('.opt1').slideDown(); $(".opt1").addClass('current-opt');
thanks m_hutley, worked perfectly, glad i joined this forum.
hi, i got into another problem with the solution provided above, now i cannot change the select option back to the default when i refresh the browser.
Just remove the
disabled attribute from that option, and you will be able to select it.