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
  • 11,413
  • 31
  • 100
  • 152
  • 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
  • 212,659
  • 41
  • 396
  • 397
0

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

ingo
  • 5,469
  • 1
  • 24
  • 19
0

or you can use as well like this :

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

AlexC
  • 9,657
  • 17
  • 64
  • 98