allen@university.edu
Learn. Motivate. Create.
Take a course in progressive methods of kids learning using high-tech solutions and innovative programs. Take a course in progressive methods of kids learning using high-tech solutions and innovative programs.
Preliminaries is the first section of a book, and is usually the smallest section in terms of pages.
Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, "methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied."
Front matter, or preliminaries, is the first section of a book, and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed, or printed, on either display pages or blank pages.
Features
Our goal is to deliver value to our client through high quality services
Quality
We are the leading firm by delivering quality and value to our clients.
Support
Our managers are always ready to answer your questions. You can call us at the weekends and at night.
Flexibility
This method lets us to get success in problems of all levels.
Experience
All our professionals have more than 5 years of legal experiences.
Presents
We like to make people happy. We ask our clients about their birthday and prepare cool presents.
Efficiency
We take care about our clients time. Just call us — and we will help you with all the questions.
What you'll get
Everyday we work hard to make life of our clients better and happier
Hight Quality
We are the leading firm by delivering quality and value to our clients. All our professionals have more than 5 years of legal experiences. We like what we do.
Learn more
Good Support
Our managers are always ready to answer your questions. You can call us at the weekends and at night. Also you can visit our office for personal consultation.
Learn more
Top 3 reasons to choose us
Everyday we work hard to make life of our clients better and happier
-1-
High Quality
We are the leading firm by delivering quality and value to our clients. We like what we do. We like to make people happy.
-2-
Unique Experience
All our professionals have more than 5 years of legal experiences. They use their knowledge to make our clients life better.
-3-
Good Support
Our managers are always ready to answer your questions. You can call us at the weekends and at night.
Meet our leaders
The smartest people work every day to provide the best service and to make our clients happy
Eva Stark
Customers Support
Eva is the voice of our brand. She spends hours to make our clients feel care and enjoy communication with the company. If you have any suggestions or ideas you can write her.
Julia Bush
Design Director
Julia takes care of everything you can see. She spent five years in London learning visual communication. She uses her knowledge to make the world a little more beautiful.
Max Holden
Founder & Art Director
Max invented our company. He is the father of our main goals and values. He has founded first core members of our team and helped them to show their unique talents in work process.
Meet our team
The smartest people work every day to provide the best service and to make our clients happy
Max Holden
Founder & Art Director
Eva Stark
Customers Support
Julia Bush
Design Director
Carlos Lott
Marketing Director
How it works
1
Hight Quality
We are the leading firm by delivering quality and value to our clients. All our professionals have more than 5 years of legal experiences. We like what we do.
2
Good Support
Our managers are always ready to answer your questions. You can call us at the weekends and at night. Also you can visit our office for personal consultation.
3
Individual Approach
Our company works according to the principle of individual approach to every client. This method lets us to get success in problems of all levels.
More products
Our contacts
Feel free to write and call us. We really love to communicate with our clients.
+1 123 456 78 90
hello@madeontilda.com
Loft Pineapple, 22 Pink Street, New York
Product
  • Home page
  • Tour
  • Templates
Education
  • Workshops
  • How to make a website
  • Design course
  • Explore
Help
  • Knowledge base
  • Video tutorials
  • Code Export
Subscribe
© 2016 YourCompany
Website Development: Tilda

Как добавить простой поиск на одной странице с подсветкой найденного слова в Tilda

Как выполнили данный пример:

1. Добавили на страницу код 1 (скрипт поиска)
2. Добавили на страницу код 2 (стили оформления блока поиска и подсветки слов)
3. Добавили на страницу код 3 (каркас блока поиска)

4* Код из этого примера, который обрабатывает нажатие на лупу в ZeroBlock
*** Как сделали его:
1. Создали меню из ZeroBlock
2. Добавили 2-е иконки с лупами и задали им ссылки
#searchdown
#searchup

Коды вставляются в блок ДРУГОЕ►Т123

1
<script type="text/javascript">
jQuery.fn.highlight = function(pat) {
	function innerHighlight(node, pat) {
		var skip = 0;
		if (node.nodeType == 3) {
		var pos = node.data.toUpperCase().indexOf(pat);
		if (pos >= 0) {
			var spannode = document.createElement('span');
			spannode.className = 'highlight';
			var middlebit = node.splitText(pos);
			var endbit = middlebit.splitText(pat.length);
			var middleclone = middlebit.cloneNode(true);
			spannode.appendChild(middleclone);
			middlebit.parentNode.replaceChild(spannode, middlebit);
			skip = 1;
		}
		}
		else if (node.nodeType == 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {
			for (var i = 0; i < node.childNodes.length; ++i) {
				i += innerHighlight(node.childNodes[i], pat);
			}
		}
		return skip;
	}
	return this.each(function() {
		innerHighlight(this, pat.toUpperCase());
	});
};
jQuery.fn.removeHighlight = function() {
	return this.find("span.highlight").each(function() {
		this.parentNode.firstChild.nodeName;
		with (this.parentNode) {
			replaceChild(this.firstChild, this);
			normalize();
		}
	}).end();
};
jQuery.fn.selectHighlight = function(number) {
	return this.find("span.highlight:eq("+number+")").addClass('selectHighlight').end();
};    
</script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>


<script type="text/javascript">
jQuery(document).ready(function(){

	var search_number = 0;
	var search_count = 0;
	var count_text = 0;
	var srch_numb = 0;
	var srch_txtid = '#allrecords';

	function scroll_to_word(){
		var pos = $(srch_txtid + ' .selectHighlight').position();
		jQuery.scrollTo(".selectHighlight", 500, {offset:-150});
	}

	$('#search_text').bind('keyup oncnange', function() {
		$(srch_txtid).removeHighlight();
		txt = $('#search_text').val();
		if (txt == '') return;
		$(srch_txtid).highlight(txt);
		search_count = $(srch_txtid + ' span.highlight').size() - 1;
		count_text = search_count + 1;
		search_number = 0;
		$(srch_txtid).selectHighlight(search_number);
		if ( search_count >= 0 ) scroll_to_word();
		$('#count').html('Найдено: <b>'+count_text+'</b>');
	});
            
	$('#clear_button').click(function() {
		$(srch_txtid).removeHighlight();
		$('#search_text').val('');
		$('#count').html('');
		jQuery.scrollTo(0, 500, {queue:true});
	});
            
	$('#prev_search').click(function() {
		if (search_number == 0) return;
		$(srch_txtid + ' .selectHighlight').removeClass('selectHighlight');
		search_number--;
		srch_numb = search_number + 1;
		$(srch_txtid).selectHighlight(search_number);
		if ( search_count >= 0 ) { 
			scroll_to_word();
			$('#count').html('Показан вариант: <b>'+srch_numb+'</b> из '+$(srch_txtid + ' span.highlight').size());
		}
	});
	$('#next_search').click(function() {
		if (search_number == search_count) return;
		$(srch_txtid + ' .selectHighlight').removeClass('selectHighlight');
		search_number++;
		srch_numb = search_number + 1;
		$(srch_txtid).selectHighlight(search_number);
		if ( search_count >= 0 ) { 
			scroll_to_word();
			$('#count').html('Показан вариант: <b>'+srch_numb+'</b> из '+$(srch_txtid + ' span.highlight').size());
		}
	});
});
</script>

2
<style>
/*Настройка шрифта и размера для блока поиска*/
    div#search_block , input#search_text , .srchbtn {
    font-family: 'Roboto',Arial,sans-serif;
    font-size: 15px;
}
/*Визуальные настройки для блока поиска*/
 div#search_block  {
    display:none; 
    background: #ffffff;
    padding: 15px;
    box-shadow: 3px 3px 9px 0px #d2d2d2; 
    top: 85px;
    right: 0;
    border-radius: 0 0 0 15px;
    z-index: 9999;
}
/*Настройка для кнопок блока поиска*/
.srchbtn {
    outline: none;
    cursor: pointer;
    background: #ffcc0a;
    border: 2px solid transparent;
    color: #ffffff;
    font-weight: bold;
}
/*Настройка для кнопок блока поиска*/
.prev_btn {
    border-radius: 10px 0 0 10px;
}
/*Настройка для кнопок блока поиска*/
.next_btn {
    border-radius: 0 10px 10px 0;
}

input#search_text {
    padding-left: 6px;
    border: 2px solid #ffcc0a;
    opacity: 0.7;
}

.srchbtn:hover {
    background-color: #e6b800 !important;
}


.highlight {
	background-color: rgb(255,255,153);
}
.selectHighlight {
	background-color: #ffcc0a; 
	-moz-border-radius: 5px; /* FF1+ */ 
	-webkit-border-radius: 5px; /* Saf3-4 */ 
	border-radius: 5px; /* Opera 10.5, IE 9, Saf5, Chrome */ 
	-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); /* FF3.5+ */ 
	-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); /* Saf3.0+, Chrome */ 
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); /* Opera 10.5+, IE 9.0 */ 
	padding:1px 4px; 
	margin:0 -4px;
	color:#025199;
}
.finded{
	color:white;background: #8A8A7B;
}
</style>

2
<style>
/*Настройка шрифта и размера для блока поиска*/
    div#search_block , input#search_text , .srchbtn {
    font-family: 'Roboto',Arial,sans-serif;
    font-size: 15px;
}
/*Визуальные настройки для блока поиска*/
 div#search_block  {
    display:none; 
    background: #ffffff;
    padding: 15px;
    box-shadow: 3px 3px 9px 0px #d2d2d2; 
    top: 85px;
    right: 0;
    border-radius: 0 0 0 15px;
    z-index: 9999;
}
/*Настройка для кнопок блока поиска*/
.srchbtn {
    outline: none;
    cursor: pointer;
    background: #ffcc0a;
    border: 2px solid transparent;
    color: #ffffff;
    font-weight: bold;
}
/*Настройка для кнопок блока поиска*/
.prev_btn {
    border-radius: 10px 0 0 10px;
}
/*Настройка для кнопок блока поиска*/
.next_btn {
    border-radius: 0 10px 10px 0;
}

input#search_text {
    padding-left: 6px;
    border: 2px solid #ffcc0a;
    opacity: 0.7;
}

.srchbtn:hover {
    background-color: #e6b800 !important;
}


.highlight {
	background-color: rgb(255,255,153);
}
.selectHighlight {
	background-color: #ffcc0a; 
	-moz-border-radius: 5px; /* FF1+ */ 
	-webkit-border-radius: 5px; /* Saf3-4 */ 
	border-radius: 5px; /* Opera 10.5, IE 9, Saf5, Chrome */ 
	-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); /* FF3.5+ */ 
	-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); /* Saf3.0+, Chrome */ 
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); /* Opera 10.5+, IE 9.0 */ 
	padding:1px 4px; 
	margin:0 -4px;
	color:#025199;
}
.finded{
	color:white;background: #8A8A7B;
}
</style>

3
<div id="search_block" style="position: fixed;">
	<input id="prev_search" class="prev_btn srchbtn" type="button" value="◄">
	<input id="search_text" type="text" placeholder = "Поиск" value="" if (this.value=='') this.value='';" onfocus="if (this.value=='Поиск') this.value='';">
	<input id="next_search" class="next_btn srchbtn" type="button" value="►">
 	<input id="clear_button"  class="clear_btn srchbtn"  type="button" value="X">
 <!-- 	<br>
	<div id="count" style="font-size:10pt;"></b></div>  Меню -->
</div>

4**
<script>
//При нажатии на кнопку со ссылкой #searchdown
 $('[href = "#searchdown"]').click(function(event) {
//Открываем  блок поиска
    $('#search_block').slideDown(500); //и задаём время анимации 
    $('[href = "#searchup"]').show();
    $('[href = "#searchdown"]').hide();
event.preventDefault(); });
//При нажатии на кнопку со ссылкой #searchdown
 $('[href = "#searchup"]').click(function(event) {
//Открываем  блок поиска
    $('#search_block').slideUp(500); //и задаём время анимации 
    $('[href = "#searchup"]').hide();
    $('[href = "#searchdown"]').show();
event.preventDefault(); });
</script>
Made on
Tilda