Widget:KeywordSearch: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
Line 11: | Line 6: | ||
var andBox = " <input type='text' class='queryString' /> "; | var andBox = " <input type='text' class='queryString' /> "; | ||
$("#formSpace").html(orBox); | $("#formSpace").html(orBox); | ||
$(".queryString").focus(function(){$(".focused").removeClass( "focused" );$( this ).parent().addClass( "focused" );}); | |||
$(".queryString").focusout(function(){alert('Hi!');}); | |||
$("#orOp").click(function(){ | $("#orOp").click(function(){ | ||
$("#formSpace").append(orBox); | $("#formSpace").append(orBox); | ||
$(".queryString").focus(function(){$(".focused").removeClass( "focused" );$( this ).parent().addClass( "focused" );}); | |||
}); | }); | ||
Line 19: | Line 17: | ||
var andBox = "<input type='text' class='queryString' />"; | var andBox = "<input type='text' class='queryString' />"; | ||
$(".focused").append(andBox); | $(".focused").append(andBox); | ||
$(".queryString").focus(function(){$(".focused").removeClass( "focused" );$( this ).parent().addClass( "focused" );}); | |||
}); | }); | ||