Jump to content

Форма поиска


russalex
 Share

Recommended Posts

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><script type="application/javascript" src="js/search.js"></script><script type="application/javascript" src="js/jquery-1.9.1.min.js"></script><link href="css/style.css" type="text/css" rel="stylesheet"><title>Верхний блок</title></head><body>	<div id="wrapper">		<div id="top">			<div id="center">				<ul class="frinds">                                <li class="logo"><a href="http://www.netinfocompany.bg/" target="_blank"></a></li>                                <li><a href="http://www.vesti.bg/">Vesti.bg</a></li>                                <li><a href="http://www.sportni.bg/" target="_blank">Sportni.bg</a></li>                                <li><a href="http://sinoptik.bg/" target="_blank">Sinoptik.bg</a></li>                                <li><a href="http://www.pariteni.bg/" target="_blank">Pariteni.bg</a></li>                                <li><a href="http://www.edna.bg/" target="_blank">Edna.bg</a></li>                </ul>				<div class="rightSide">					<div class="blockSearch">                        <form method="get" action="http://www.vesti.bg/tarsene" class="blockSearchForm">                            <p>                                <input type="text" name="q" value="" class="input-field fieldSearch Blur" />                                <input type="submit" value="" class="buttonSearch" />                            </p>                        </form>                    </div>										  												</div>						</div>				</div>				</div></body></html>

Подскажите пожалуйста, почему не работает форма поиска? Файлы скриптов находятся в папке js

$(function(){    $('.blockSearch .buttonSearch').click(function(e){        if(!$(this).hasClass('selected')){            e.preventDefault();            $(this).addClass('selected');            $('.fieldSearch').show();            $(this).css('background-color','#0e4674');            $('.blockSearch .fieldSearch').css('border','solid 1px #0e4674').animate({                width: '232px',                paddingLeft: '4px',                paddingRight: '4px'            },400).focus();        }else{            if($('.blockSearch .fieldSearch').val() == ''){                e.preventDefault();                $(this).removeClass('selected');                $(this).attr('style','');                $('.blockSearch .fieldSearch').attr('style','').blur();            }        }    })})
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy