Fix bug

the check box change to toggleClass instead of addClass
Adding another check, trimming white space