Side navigation
#13157 closed bug (duplicate)
Opened January 05, 2013 05:10AM UTC
Closed January 05, 2013 01:46PM UTC
Comportamiento raro
| Reported by: | Floresta | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.8.3 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
Este código no funciona (Visual Studio 2008):
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Form1.aspx.vb" Inherits="JQuery.Form1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<script type="text/javascript" src="jquery-1.8.3.js"></script>
<style type="text/css">
.Textos
{
background-color:Yellow;
}
.Textos2
{
background-color:Green;
}
.Textos3
{
background-color:Red;
}
</style>
<script type ="text/javascript">
function Cambiar() {
$("#div1 input").addClass("Textos2");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="div1">
<input type="text" id="txt1" class="Textos" value="Esto es un Input tipo Text" />
<br />
<input type="text" id="txt2" class="Textos3" value="Esto es otro Input tipo Text" />
<br />
<input type="text" id="Text1" class="Textos" value="Esto es otro Input tipo Text" />
<br />
<input type="button" id="btnCambio" value="jquery" onclick ="Cambiar()" />
</div>
</form>
</body>
</html>
Pero cambiando de lugar algunas líneas si funciona!!!
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Form1.aspx.vb" Inherits="JQuery.Form1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<script type="text/javascript" src="jquery-1.8.3.js"></script>
<style type="text/css">
.Textos
{
background-color:Yellow;
}
.Textos3
{
background-color:Red;
}
.Textos2
{
background-color:Green;
}
</style>
<script type ="text/javascript">
function Cambiar() {
$("#div1 input").addClass("Textos2");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="div1">
<input type="text" id="txt1" class="Textos" value="Esto es un Input tipo Text" />
<br />
<input type="text" id="txt2" class="Textos3" value="Esto es otro Input tipo Text" />
<br />
<input type="text" id="Text1" class="Textos" value="Esto es otro Input tipo Text" />
<br />
<input type="button" id="btnCambio" value="jquery" onclick ="Cambiar()" />
</div>
</form>
</body>
</html>
Solo se colocó el estilo ".Text3" arriba del estilo ".Text2".
*** Este ticket debe ser eliminado (no se cómo se hace). En el browser Opera 12.12 luego del captcha, se queda colgado y al presionar "Submit" se duplica el ticket ***