0


can anybody tell me why i get the error "translater is not defined" ?

working example http://jsfiddle.net/PkqKg/7/

I am confused.Thanks in advance!
Peter

Peter
  • 10,619
  • 30
  • 94
  • 147
  • duplicate of [JavaScript not running on jsfiddle.net](http://stackoverflow.com/questions/5468350/javascript-not-running-on-jsfiddle-net) – Bergi Apr 09 '13 at 09:20

3 Answers3

1

jsfiddle runs the contents of the Javascript box inside a closure, so your variables cannot be accessod globally. You can do this if you want

window.translater = function() {.. }
Dogbert
  • 200,802
  • 40
  • 378
  • 386
0

Or simply change it to no wrap(head or body) http://jsfiddle.net/PkqKg/9/

ingo
  • 5,289
  • 1
  • 23
  • 18
0

or you can use as well like this :

http://jsfiddle.net/corotchi/PkqKg/10/

AlexC
  • 9,579
  • 17
  • 62
  • 96