jQuery(function($){
$.get("{THEME}/images/sprite.svg", function(data) {
var div = document.createElement("div");
div.innerHTML = new XMLSerializer().serializeToString(data.documentElement);
document.body.insertBefore(div, document.body.childNodes[0]);
});
});
$(document).ready(function(){
$.fn.animate_Text = function() {
var string = this.text();
return this.each(function(){
var $this = $(this);
$this.html(string.replace(/./g, '$&'));
$this.find('span.new').each(function(i, el){
setTimeout(function(){ $(el).addClass('div_opacity'); }, 60 * i);
});
});
};
$('#example').show();
$('#example').animate_Text();
$('#example').fadeOut(60000);
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="JS/ScriptTest.js"></script>
<link rel="stylesheet" href="CSS/StyleTest.css">
<title>Document</title>
</head>
<body>
<input type="text" id="OP" onkeyup="if (this.value == 1) alert('Точно ?')">
</body>
</html>
var str = '<div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div>';
var regexp = /(<div class="abc"><\/div>)/g;
var matches_array = str.match(regexp);
<div class="checkbox" >
<input type="checkbox" id="all" onclick="showAll();"><label for="all">Показать все</label>
<input type="checkbox" id="one" onclick="hideBox();"><label for="one">Показать one</label>
<input type="checkbox" id="two" onclick="hideBox();"><label for="two">Показать two</label>
<input type="checkbox" id="three" onclick="hideBox();"><label for="three">Показать three</label>
</div>
<div class="blocks">
<div class="one">текст блока one</div>
<div class="two">текст блока two</div>
<div class="three">текст блока three</div>
</div>
function showAll () {
$('.blocks div').css('display','block');
$('.checkbox input').attr('checked', false);
$('#all').prop('checked', true);
};
function hideBox() {
$('#all').attr('checked', false);
$( ".blocks div" ).each(function(i) {
var className = $(this).attr("class");
var idBox = $('#'+className).prop("checked");
if (!idBox) {
$(this).css('display','none');
} else {
$(this).css('display','block');
};
});
};