slide range not working inside update panel
this is working good when i change range it shows the number in label but when i put the range slider inside update panel it stops working
please advice
<div class="row" id="dvhours" runat="server" visible="false">
<div class="col-md-3">
Number of Hours
</div>
<div class="col-md-6">
<%-- <asp:TextBox ID="txtsqfoot" runat="server"></asp:TextBox>--%>
<input type="range" runat="server" min="0" step="1" max="50" value="0" class="slider"
id="myRange5">
<asp:Label ID="lblnumberofhours" runat="server" Text="0"></asp:Label>
</div>
</div>
<script>
//var slider = document.getElementById("myRange");
var slider5 = document.getElementById("<%=myRange5.ClientID %>");
var output5 = document.getElementById("<%=lblnumberofhours.ClientID %>");
output5.innerHTML = slider5.value;
slider5.oninput = function () {
output5.innerHTML = this.value;
}
</script>