fixed replace is not a function  where boolean true

 was being passed into jquery css function instead of style name.