$("a[href$='.jpg'],a[href$='.JPG'], a[href$='.png'], a[href$='.gif']").fancybox({ 'showCloseButton': false }).hover(function() { $(this).click(); $(".fancybox-overlay").mouseout(function() { $.fancybox.close(); }); });
Архив
Сентябрь 2013
Всего: 2 записи
javascript: выбрать option по value
В примере в select выбираем option c нужным value (id — необходимое значение)
function InlineForm(id) { var poluch=document.getElementById('poluch'); var poluch_o=poluch.options; $("#poluch").find("option").removeAttr("selected"); for (i=0;i<poluch_o.length;i++) { if (poluch_o[i].value==id) { poluch[i].setAttribute("selected","selected"); poluch[i].selected=true; } } }