I am curious as to why the div
tag is unable to hide the Struts2 tags. I have set up a div
that should be hidden on load, and using onChange
, I am triggering jQuery to toggle the visibility of the div
tag...
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" >
$( document ).ready(function() {
$("#t").click(function(){
alert("I Know Its Not Working");
$('#tt').toggle();
});
});
</script>
</head>
<body>
<s:form >
<div style="display: none;" id="tt">
<s:textfield></s:textfield>
</div>
</s:form>
<input type="button" id="t">
</body>
</html>