Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(function($) {
- //обработчик нажатия на кнопку поиска
- $('.search_button').click(function() {
- if ($("#search_string").val() != '') {
- $(".search_button").attr('disabled', 'disabled');
- $("#search_results").html('Ждите...');
- jQuery.ajax({
- type: 'GET',
- url: '/e107_plugins/rwworld/rw_search_handler.php',
- cache: false,
- data: {'t': $(this).attr('id'), 's': encodeURIComponent($("#search_string").val()), 'p': 1},
- dataType: 'html',
- success: function(text){
- $("#search_results").html(text).show("slow");
- $("#search_results").live();
- $(".search_button").removeAttr('disabled');
- },
- });
- } else {
- $("#search_results").html("<div class='message'>Укажите в поле '<i>Что ищем?</i>' то, что требуется найти</div>");
- }
- return false;
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement