0

I am writing an interactive google map in javascript for a wordpress page. As far as I know, the only way to use javascript with wordpress is by creating a separate .js file and just calling the methods from there within the wordpress page. So my question is, if I need to use the google maps api in my javascript code, how do I 'include' it within the .js file instead of using a <script> tag in the html?

Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
azrosen92
  • 8,357
  • 4
  • 26
  • 45

1 Answers1

1

AFAIK there is no include in javascript. Take a look at wp_enqueue_script().

Edit

Just stumbled over the yepnope.js library by Alex Sexton. Maybe this is what you are looking for.

CSSian
  • 1,621
  • 13
  • 19
Gerald Schneider
  • 17,416
  • 9
  • 60
  • 78