Home › Forums › JavaScript › working in jsfiddle but not in the browser. › Reply To: working in jsfiddle but not in the browser.
October 27, 2014 at 6:12 pm
#187146
__
Participant
my code is working in jsfiddle but not in the browser.
How are you viewing the jsfiddle website, if not with a browser?
; )
But seriously: how does your markup+code differ from that which you put in jsfiddle? Is jsfiddle loading any assets for you (e.g., jQuery)? is jsfiddle running your code on DOM ready, and did you make sure to do the same?
Also, I know the formatting is bad here on the forums, but it looks like the code you posted is missing an opening bracket (right after else
), and a semicolon (right after return true
).