Hi,
I think your script called `$(document).ready(...)` before jQuery.js was loaded.
RTD theme is loading jQuery script after `{% block body %}`
https://github.com/snide/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/layout.html
then you can't use jQuery function in your content by using `.. raw:: html`.
You can implement your custom javascript in your js file and use it as:
1. Place "_static/custom.js" in your sphinx project.
2. Add below lines in your conf.py:
def setup(app):
app.add_javascript('custom.js')
3. Do "make html"
That's all.
See also:
http://sphinx-doc.org/extdev/appapi.html#sphinx.application.Sphinx.add_javascript
Regards,
--
Takayuki SHIMIZUKAWA
http://about.me/shimizukawa
2014-10-10 6:52 GMT+09:00 Daofeng Li <[email protected]>:
> Dear group,
>
> I am using the readthedocs.org theme for my sphinx project.
> I am trying to include an responsive image map supporting resize by
> http://mattstow.com/experiment/responsive-image-maps/rwd-image-maps.html
> I have an html page work great, when I tried to include this html using the
> raw directive, I got this error message:
> undefined is not a function
>
> Did anyone have some suggestions on including responsive image maps using
> sphinx? Thanks a lot.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.