admin管理员组

文章数量:1306822

My client has a Google site and is requesting some jQuery/javascript functionality like lightboxes, etc. Can I assume I can tackle most generic jQuery/javascript features (By way of the gadgets API), or are there limitations I need to know about?

Thanks-

My client has a Google site and is requesting some jQuery/javascript functionality like lightboxes, etc. Can I assume I can tackle most generic jQuery/javascript features (By way of the gadgets API), or are there limitations I need to know about?

Thanks-

Share Improve this question asked May 4, 2011 at 20:54 YarinYarin 184k155 gold badges410 silver badges524 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

Wow I just googled Google Sites JQuery and the first page that came was a google FAQ answering your question.

Can I use JQuery in Google sites?

The most popular answer:

Yes you can. Step by step : Add "safe html bypass" gadget to your site. Then in the properties section of the gadget, insert this html :

<script type="text/javascript"  src="http://ajax.googleapis./ajax/libs/jquery/1.3/jquery.min.js"></script>

After that you can use jquery by adding more html elements and javascript. Example code :

<script type="text/javascript" src="http://ajax.googleapis./ajax/libs/jquery/1.3/jquery.min.js"></script>
<input type="text" value="oerten" id="text" onclick="" />
<input type="button" value="Click" id="but" onclick="var val=$('#text').attr('value');alert(val);" />
<br />  
Just paste this code snippet into the
"HTML Code" section of the "safe html
bypass" gadget. Save it and go

Further Reading:

How to add javascript or custom contents to google sites with gadget

本文标签: JavaScriptjQuery limitations in Google SitesStack Overflow