Click here to Skip to main content
15,886,873 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Need to read xml from HTTPS to HTTP Server Pin
Marco Bertschi19-Mar-13 2:29
protectorMarco Bertschi19-Mar-13 2:29 
AnswerRe: Need to read xml from HTTPS to HTTP Server Pin
dusty_dex19-Mar-13 8:59
dusty_dex19-Mar-13 8:59 
QuestionMoveMenuItems Pin
Dungas17-Mar-13 20:56
Dungas17-Mar-13 20:56 
AnswerRe: MoveMenuItems Pin
jkirkerx18-Mar-13 8:14
professionaljkirkerx18-Mar-13 8:14 
AnswerRe: MoveMenuItems Pin
Moykn2-Apr-13 2:32
Moykn2-Apr-13 2:32 
Questionhow to show unique number in the form ,and after submit when next time a user will enter it will show another unique number Pin
Member 824369316-Mar-13 2:18
Member 824369316-Mar-13 2:18 
AnswerRe: how to show unique number in the form ,and after submit when next time a user will enter it will show another unique number Pin
ZurdoDev19-Mar-13 2:20
professionalZurdoDev19-Mar-13 2:20 
QuestionHelp me with Jquery Pin
Nafiseh Salmani14-Mar-13 5:43
Nafiseh Salmani14-Mar-13 5:43 
this is a jquery question, I am not sure if this is a correct forum to post it though.

There is a DIV tag with many elements inside. the div tag has a class to add jquery function to manage mouseover, mouseleave and click event to redirect to another page. everything works great till now. The problem is, now I have to add a button inside the div which should have its own function different from the div click.

I would appreciate if anybody can help me.

please note that I can't use the elements id, since the div is inside a repeater.


here are my Jquery code:

JavaScript
$('.Status').click(function() {
              $(this).attr('data-redirect', '1');

          });

          $('.Highlight').click(function() {

              var type = $(this).attr('data-DailyViewType');
              var typeid = $(this).attr('data-editurl');
              var btn_status = $(this).find('data-redirect');
              if ($(this).hasClass('Status')) {

                  alert(1);
              }

              if (type != undefined || type != null) {
                  window.location = 'RuleEdit.aspx?DailyRuleTypeID=' + type;
              }
              else {

                  if (typeid != undefined || typeid != null) {
                      if (typeid > 0 && btn_status != 1) {
                          window.location = 'RuleEdit.aspx?id=' + typeid;
                      }
                      else {

                      }
                  }
              }

          });
          $('.Highlight').mouseover(function() {
              $(this).css('border-left-color', '#FF9900');
              $(this).css('background-color', '#FAFAFA');

          });
          $('.Highlight').mouseleave(function() {
              $(this).css('border-left-color', 'White');
              $(this).css('background-color', 'White');
          });


<asp:Repeater ID="RptRulesAndAlerts" runat="server"
onitemdatabound="RptRulesAndAlerts_ItemDataBound" >
<ItemTemplate>
<div class="tabs-content Highlight " align="center" data-editurl='<%# DataBinder.Eval(Container.DataItem, "RuleAlertID") %>'>
<asp:Panel ID="RuleAlert" runat="server">
<table cellpadding="7" cellspacing="7" style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #CDCDCD ; font-size: 11px; ">
<tr valign="middle">
<td><asp:Panel ID="Highlighter" runat="server"></asp:Panel> </td>
<td width="12%" >
<div class=" notification-type" style="font-weight: bold; word-spacing: 90px; font-size: 12px;" align="center" >

<%# GetLocalResourceObject(DataBinder.Eval(Container.DataItem, "Type").ToString()) %>
</div>
</td>
<td width="40%">
<div id="div_AlarmRuleTitle" style="font-weight: bold; font-size: 12px; color: #222; line-height: 24px;" align="left">
<img src='<%# Page.ResolveClientUrl(DataBinder.Eval(Container.DataItem, "ImgUrl").ToString()) %>' id="ImgAlarm" alt="" />
<label id="lbl_title" > <%# DataBinder.Eval(Container.DataItem, "Name") %> </label>

</div>
<br />
<div id="div_AlarmRuleDesc" style="font-size: 11px; line-height: 16px; color: #777" align="left">
<asp:Label ID="lbl_desc" runat="server" ></asp:Label>
<br />
<%# GetLocalResourceObject(DataBinder.Eval(Container.DataItem, "EventDescription").ToString()) %>
<br />
<asp:Label runat="server" ID="lbl_recipient" ></asp:Label>

</div>
</td>
<td width="14%" style="font-size: 11px"> <%# DataBinder.Eval(Container.DataItem, "Time")%>
</td>
<td width="15%" >
<%# GetLocalResourceObject(DataBinder.Eval(Container.DataItem, "UploadMethod").ToString())%>
</td>
<td width="20%" align="center" valign="middle">
<asp:Panel ID="pnl_status" runat="server" Class="Status" data-redirect="0">
<%--<div class=" switch switch-warning toggle " id="toggleOnOff" runat="server" data-toggle="switch" data-checkbox="chkOnOffToggle" ></div>--%>
<%--<asp:LinkButton ID="toggleOnOff" runat="server" OnClick="Toggle" CssClass=" switch switch-warning toggle " data-toggle="switch" data-checkbox="chkOnOffToggle"></asp:LinkButton>---%>
</asp:Panel>
</td>
<td width="">
<asp:Panel ID="pnl_button" runat="server" >
</asp:Panel>
</td>

</tr>

</table>
</asp:Panel>
</div>

</ItemTemplate>
</asp:Repeater>
AnswerRe: Help me with Jquery Pin
ZurdoDev15-Mar-13 11:04
professionalZurdoDev15-Mar-13 11:04 
AnswerRe: Help me with Jquery Pin
Moykn2-Apr-13 2:46
Moykn2-Apr-13 2:46 
AnswerRe: Help me with Jquery Pin
Crazy Kid2-May-13 16:54
professionalCrazy Kid2-May-13 16:54 
QuestionReading a text file in JS Pin
Hakan Bulut13-Mar-13 22:32
Hakan Bulut13-Mar-13 22:32 
AnswerRe: Reading a text file in JS PinPopular
Richard MacCutchan13-Mar-13 22:50
mveRichard MacCutchan13-Mar-13 22:50 
AnswerRe: Reading a text file in JS PinPopular
Manfred Rudolf Bihy14-Mar-13 0:14
professionalManfred Rudolf Bihy14-Mar-13 0:14 
AnswerRe: Reading a text file in JS Pin
dusty_dex14-Mar-13 5:14
dusty_dex14-Mar-13 5:14 
GeneralRe: Reading a text file in JS Pin
Hakan Bulut14-Mar-13 23:16
Hakan Bulut14-Mar-13 23:16 
GeneralRe: Reading a text file in JS Pin
dusty_dex15-Mar-13 1:02
dusty_dex15-Mar-13 1:02 
GeneralRe: Reading a text file in JS Pin
Hakan Bulut15-Mar-13 7:42
Hakan Bulut15-Mar-13 7:42 
GeneralRe: Reading a text file in JS Pin
dusty_dex19-Mar-13 4:19
dusty_dex19-Mar-13 4:19 
GeneralRe: Reading a text file in JS Pin
Hakan Bulut19-Mar-13 5:45
Hakan Bulut19-Mar-13 5:45 
GeneralRe: Reading a text file in JS Pin
dusty_dex19-Mar-13 8:41
dusty_dex19-Mar-13 8:41 
QuestionJava Script Question Pin
Hakan Bulut9-Mar-13 3:44
Hakan Bulut9-Mar-13 3:44 
AnswerRe: Java Script Question Pin
Richard MacCutchan9-Mar-13 22:52
mveRichard MacCutchan9-Mar-13 22:52 
GeneralRe: Java Script Question Pin
Hakan Bulut12-Mar-13 0:39
Hakan Bulut12-Mar-13 0:39 
GeneralRe: Java Script Question Pin
Richard MacCutchan12-Mar-13 0:42
mveRichard MacCutchan12-Mar-13 0:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.