<body>
<div>
<button class="ui blue button show fluid">Подробнее</button>
<div class="ui modal longer">... </div> <!-- это модальное окно -->
</div>
</body>
<body>
<div>
<button class="ui blue button show fluid">Подробнее</button>
</div>
<div class="ui dimmer modals page transition visible active">... </div> <!-- это модальное окно -->
</body>
$(document).ready(function(){
var interval,
count,
tick,
selectedVal = $.cookie("selected-val");
function refresh() {
clearInterval(interval);
clearInterval(count);
tick = 0;
$('#reload-nc').click();
$('.timer').text(tick + ' c.');
count = setInterval(function(){
tick++;
$('.timer').text(tick + ' c.')
}, 1000);
interval = setInterval(function(){
$('#reload-nc').click();
}, $('#select').val() * 1000);
}
if (selectedVal) {
$("#select").val(selectedVal);
refresh();
}
$("#select").on("change", function(){
var selection = $(this).val();
$.cookie("selected-val", selection, {expires: 365, path: '/'})
refresh();
});
});
А как упростить - это вы уже сами подумайте. window.onload = function() {
var links = document.getElementsByTagName("a");
for (var i = 0; i < links.length; i++) {
var link = links[i];
link.onmouseover = function() {
this.setAttribute("org_title", this.title);
this.title = "";
};
link.onmouseout = function() {
this.title = this.getAttribute("org_title");
};
}
};
();
.b-product__price
, потому нужно просто удалить его $(this).remove();
func1('func2');
func1('func3');
не написать func2();
func3();
?function myBigFunction() {
var methods = {
func1: function(functionName) {
methods[functionName]();
},
func2: function() {
console.log('2');
},
func3: function() {
console.log('3');
}
}
methods.func1('func2');
methods.func1('func3');
}