0

I am using a search bar that has token auto-complete, the well known loopj :-). Even though I have set up the form fields correctly, they only react to event handling coded in loopj and to the css modifications done in my custom js file(presented below).

How can I intervene by adding my own events in a different file, lets say if loopj defines handelr1 and I define handler2, how can I make it execute both handler1 and handler2?

Here is my jQuery file:

(function($){
$(document).ready(function() {

$("#search-engine").tokenInput("http://playground.com/search/callback", {
  theme: "facebook",
  queryParam: "search_param"
});

$("#search-engine-2").hover(
    function () {
        $(this).append($("<span>***</span>"));
    }
  );
$("#search-engine-2").css("border","3px solid red");

$("#search-engine-2").hover(
    function () {
        $(this).append($("<span> ***</span>"));
    },
  function () {
    $(this).find("span:last").remove();
  }
);
  //li with fade class
  $("#search-engine-2.fade").hover(
    function(){
        $(this).fadeOut(100);$(this).fadeIn(500);
    });
  });
})(jQuery);

Thanks

Potney Switters
  • 2,902
  • 4
  • 33
  • 51
  • 1
    Your title mentions CSS, but your question does not? – Surreal Dreams May 30 '12 at 14:21
  • In the code you can see that I try to use event handling and modification of css. The latter is the only one that works, this is the reason I refer to the non working part(event-handling). Sorry about the formalization, I'll fix it. – Potney Switters May 30 '12 at 14:25

0 Answers0