Skip to content

Instantly share code, notes, and snippets.

@zukilover
Created August 4, 2015 01:53
Show Gist options
  • Save zukilover/58f6670cd797298f34d2 to your computer and use it in GitHub Desktop.
Save zukilover/58f6670cd797298f34d2 to your computer and use it in GitHub Desktop.
$('.input-custom-small[data-toggle=typeahead-multiple]').each(function(){
if( ! $('html').hasClass('ie-9') ) return;
var el = {
_self : $(this),
_core : $(this).parents('.text-core'),
_wrap : $(this).parents('.text-wrap'),
_placeholder : $(this).closest('better-placehoder')
};
if( el._placeholder.length < 1 ) el._placeholder = el._core.siblings('.better-placehoder');
el._self.on('blur', function () {
var paddingTop = el._self.css('padding-top');
console.log(parseInt( paddingTop ), el._placeholder.length)
el._placeholder
.css({
'padding-top' : paddingTop,
'padding-left' : '0',
'height' : ( parseInt( paddingTop ) + 15 ) + 'px',
'margin-top' : parseInt( paddingTop ) === 8 ? '0' : '20px'
})
.prependTo( el._wrap );
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment