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