Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- $("select").each(function(){
- if($(this).attr("data-value")){
- if($(this).find("option[value='"+$(this).attr("data-value")+"']").length==1){
- $(this).find("option[value='"+$(this).attr("data-value")+"']").attr('selected', 'selected');
- }
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement