You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
574 B
JavaScript
25 lines
574 B
JavaScript
function subimSearch()
|
|
{
|
|
|
|
window.location.href = "/news/search-news/"+document.getElementById("searchinput").value.replace(/(^\s*)|(\s*$)/g,"").replace(/ /g,"-").toLocaleLowerCase()+"/";
|
|
|
|
}
|
|
|
|
if(typeof $ == "function")
|
|
{
|
|
$(function(){
|
|
var ipe = $("#searchinput");
|
|
ipe.keydown(function(){
|
|
if(event.keyCode==13)
|
|
subimSearch();
|
|
});
|
|
ipe.focus(function(){
|
|
if($(this).val() == 'News Search')$(this).val('');
|
|
});
|
|
ipe.blur(function(){
|
|
if($(this).val() =='')$(this).val('News Search');
|
|
});
|
|
});
|
|
|
|
}
|