fix issue that web.py template and jquery incompatible. #62

Closed
wants to merge 1 commit into
from

4 participants

@xuyizhi

web.py template is not complete compatible with jquery.
for example , "$.ajax('aaa.com')" will get errors. you need change '$' to '$$' to solve the problem.It's a little boring.
And I notice that the jquery almost start with "$." or "$(", whitch is meanless in web.py template.
So, I add 2 lines that let template treat "$." "$(" as "$$." "$$(",and then both jquery and web.py work fine now.

@anandology
@systempuntoout

You can use jQuery. instead of $.

@xuyizhi

"jQuery" is a little long length string, not simple enough.
Or maybe we can set a option that can let user select "$ compatible mode"?
like
render=web.template.frender('index.html',mode="compatible")

@anandology
@xuyizhi

it's sees OK.Thanks

@xuyizhi xuyizhi closed this May 13, 2011
@jellycookie

thx,it solved my problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment