I am not adding it through a separate vf resource even.
I am directly writing HTML on the page.
<script>
$.noConflict();
(function($){
function floatLabel(inputType){
$(inputType).each(function(){
console.log("jQ Running");
var $this = $(this);
// on focus add cladd active to label
$this.focus(function(){
$this.next().addClass("active");
console.log("jQ active added");
});
//on blur check field and remove class if needed
$this.blur(function(){
if($this.val() === '' || $this.val() === 'blank'){
$this.next().removeClass();
console.log("jQ active removed");
}
});
});
}
// just add a class of "floatLabel to the input field!"
floatLabel(".floatLabel");
})(jQuery);
</script>
it does not work at all.
anyone know why?
Best Answer
solved it.
it was pretty basic.
but now works. thanks guys. and it never even loaded by console values.
thanks.