Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- var $searchIcon = '.glyphicon-search.search-icon';
- jQuery( $searchIcon ).css( 'cursor', 'pointer' );
- jQuery( $searchIcon ).click( function(){
- var $formParent = jQuery(this).parent();
- var $searchInput = $formParent.find( 'input[name=s]' );
- var $searchValue = $searchInput.val();
- if( $searchValue == '' ){
- $searchInput.focus();
- }
- else{
- window.location.href = jsvar.home_url + '?s=' + $searchValue;
- }
- } )
- } catch (e) {
- // TODO: handle exception
- console.log( e.message );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement