Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #217117

    Hello,

    I have everything setup using enque etc.. And I am trying to get a script to run.

    I verified all my files are pulling in ok etc by an alert test.

    // This works OK
    alert(“document ready occurred!”);

    // This will not trigger?
    $(“#sliderLinkOne”).on(“click”, function (e) {
    e.preventDefault();
    window.open(“http://www.google.com”, “_blank”)
    });

    #217318

    Hi w3developing!

    Edit js > avia.js, find this code on line 5:

    $(document).ready(function()
        {

    Below, add this code:

    $("a.prevent").click(function(event){ event.preventDefault(); });

    The html code should look like this:

    <a class="prevent" href="http://www.google.com">Click Here</a>

    Remove browser cache then reload the page a few times.

    Cheers!
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Adding custom jQuery – Being Pulled in OK – Is there s Special Prefix?’ is closed to new replies.