Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jquery external and internal button hyperlink

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #38669
    uddinnyc94
    Member

    how can i make it so that whenever a person clicks on the the first button it opens in a new window also how can i make it so that when a user clicks the second button that it opens in the same tab or window. i want to achieve this with jquery that being said i don’t want to write any inline javascript otherwise if that was the case i wouldn’t have posted the question i know how to achieve this using inline javascript but i want to do it using external js file and jquery.

    open in new window


    <button class="button cf-button preview-bt" role="button" type="button" href="#">
    <span class="button-content"> Preview </span>
    <span class="button-icon"> </span>
    </button>

    open in same window

    open in new window


    <button class="button cf-button preview-bt" role="button" type="button" href="#">
    <span class="button-content"> Preview </span>
    <span class="button-icon"> </span>
    </button>
Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.