jQuery - search based on val()

0 votes
167 views
added Jun 29, 2018 in jQuery by LC Marshal Captain (25,790 points)
edited Nov 2, 2018 by LC Marshal
//click element bring to specific link
$("button.news").click(function(){
  window.location ="news?combine=&field_category_value=news#main-content";
  return false;
});
 
$(".header-search .btn-header-search").click(function() {
  var searchterm = $(".header-search input").val();
  if (searchterm != "") {
    window.location = "/projects?keyword=" + searchterm;
 }
lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...