Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #1019432


    I have a button in my site which is only for clicking to addClass with jQuery.
    Now every time I click the button the page is going to refresh.
    When I set the link manually I want to disable the link wherever on the website.
    I read something about it on the forum but I need to add it in my functions file.


    Hey (Email address hidden if logged out) ,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,


    The only no link I can add to it the button is a #.
    See this topic: https://kriesi.at/support/topic/button-element-with-no-link-not-possible/

    But if I add # as link it jumps to the top of the page when I click the button but I don’t want to.
    When I set the link to manually it refreshes the page but I dont’ want to.
    See the button ‘Meer info +’ on page in private content.


    Hi (Email address hidden if logged out) ,

    Can you please post the JavaScript code that you use to make this button?

    Best regards,


    It is a normal button from the avia builder with class ‘.meer_info_portfolio’
    This is the code in my functions:

    function script_meerinfo(){ 
    	jQuery( ".meer_info_portfolio .avia-button" ).click(function() {
      jQuery( ".infoblokportfolio" ).toggleClass( "tonen" );
    add_action('wp_footer', 'script_meerinfo');

    I already found the solution:

    Added this code to my document ready function:

    jQuery(".meer_info_portfolio a").click(function(event){


    Great, glad you came up with a solution and thanks for sharing. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.