[Solved] My Javascript not working?


There is an error in your developer console because as Ghostrydr says your syntax is wrong. You are missing a “.” before focusout like this:

$(function(){
  $('.inputForm .inputbox input').focusout(function(){

    var text_val = $(this).val();

    if(text_val === "") {
      $(this).removeClass('has-value');

    } else {
      $(this).addClass('has-value');

    }

  });

});

Fiddle: http://jsfiddle.net/7vmzzhea/18/

1

solved My Javascript not working?