View Single Post
  #446  
Old 08-05-2011, 04:49 AM
 
JacksmithxD JacksmithxD is offline
 

X-Adept
  
Join Date: Oct 2010
Posts: 400
 

Default Re: X-Cart Smart Template v4.4.x

Quote:
Originally Posted by PhilJ
Nice little tip for those using the integrated dynamic search mod.

This will fade out the list of search results when you click elsewhere, as it should really behave.

1) In skin/smart_template/custom/js/smart_dynamic_search/smart_dynamic_search.js

At the end insert...
Code:
function fadeSearch() { $('#ajax_listOfOptions').fadeOut('slow'); };

2) In skin/smart_template/custom/header.tpl

Replace...
Code:
onblur="if(this.value=='') this.value='{$lng.lbl_product} {$lng.lbl_search}...';"

With...
Code:
onblur="if(this.value=='') this.value='{$lng.lbl_product} {$lng.lbl_search}...';fadeSearch();"

Kudos to Claudio for the great tip

Mine seems a little different? Am i putting it in the correct place?

input id="st_search_input" name="posted_data[substring]" type="text" value="Ink Cartridge Model... e.g Epson T0711" onblur="if(this.value=='') this.value='Ink Cartridge Model... e.g Epson T0711';" onfocus="if(this.value=='Ink Cartridge Model... e.g Epson T0711') this.value='';" {if $config.Smart_Template.st_dynamic_search eq "Y"}onkeyup="ajax_showOptions(this,'getProduct',ev ent)" onblur="this.form.submit();" {/if}/>
__________________
Xcart 4.5.2
Reply With Quote