jQuery Version: 1.4.1
I am attempting to write a simple watermark type plugin and I want to take advantage of live events since not all of the eleme
Try:
$(document).ready(function(){
$('input[type=search]').bind('focusin', function(){
$(this).animate({width: '300px'}, 500);
$('svg.magnifier').hide();
$('svg.cancel').show();
}).bind('focusout', function(){
$('svg.cancel').hide();
$('svg.magnifier').show();
$(this).animate({width: '100px'}, 500);
});
});
div.box_block {
position: relative;
}
input[type=search] {
width: 100px;
padding: 10px 10px 10px 30px;
}
/* --
SVG - https://www.iconfinder.com/iconsets/ionicons
----- */
svg {
position: absolute!important;
left: 10px;
transform: translateY(55%);
top: 0;
}
svg.cancel {
display: none;
}