Calling JQuery and VB function on the same time RRS feed

  • Question

  • Hi, I want to call JQuery and VB function on the same time in one button, but I have a problem when calling them, the JQuery didn't work. 

    I have this button:

    <asp:Button ID="Display" runat="server" Text="Tampilkan" />	

    while I have VB function on the back it:

    Protected Sub Display_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Display.Click
     // my code 
    End Sub

    and this JQuery script for scrolling down to the next div: 

    <script type="text/javascript">				
    		$("#<%=Display.ClientID %>").click(function(){							
    			//scroll to the second div 
    			scrollTop: $(".secondrow").offset().top },

    The problem is while the VB function and the JQuery are firing on the same time, the JQuery which should go down, it went back to the first place and the VB function is work. 

    Thank you for your help

    Tuesday, September 19, 2017 8:12 AM

All replies

  • Hello,

    Please consider asking here


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Tuesday, September 19, 2017 9:54 AM