I created a simple module that run a simple jquery code. If I signed in as a host or admin, it worked. However, when I logged out, it seemed that the code was not run. I modified Cache time to 0 in module settings, but nothing changed. Please tell me what to do.
Here is my code:
protected void Page_Load(System.Object sender, System.EventArgs e)
{
try
{
if (!ClientAPI.IsClientScriptBlockRegistered(this.Page, "jquery.js"))
{
ClientAPI.RegisterClientScriptBlock(this.Page, "jquery.js", "<script src='" + ResolveUrl("jquery.js") + "'></script>");
}
if (!ClientAPI.IsClientScriptBlockRegistered(this.Page, "jquery.lightbox-0.4.pack.js"))
{
ClientAPI.RegisterClientScriptBlock(this.Page, "jquery.lightbox-0.4.pack.js", "<script src='" + ResolveUrl("jquery.lightbox-0.4.pack.js") + "'></script>");
}
<table class="holder" border="1">
<tbody>
<tr>
<td id="1">One</td>
<td id="2">Two</td>
<td id="3">Three</td>
<td id="4">Four</td>
<td id="5">Five</td>
</tr>
</tbody></table>
<script type="text/javascript">
$(document).ready(function() {
//$("td:contains('Three')").text("we matched the text, then changed it.");
//$("td:gt(3)").text("The Last One!");
$("#4").text("We found this using the id");
$("a").click(function() {