This topic is locked

jQuery not working

10/26/2016 8:00:55 PM
PHPRunner General questions
S
stiven author

Hello,
I was wondering if maybe someone could explain why this code would not work... I have this code in a js page called forms_views.js I included this page in the header of the application so it is included everywhere. what I am trying to do is get the a link from the menu. this item is set up as an external page. This code works when I tested it outside of the application.


//alert('test'); //// this will show the alert on page load

$("a").click(function(e) {

alert('test');/// clicking on any button of the menu won't trigger this alert which i think it should?

var url = $(this).attr('href');



//if(url == 'forms.php'){

//e.preventDefault();

//PopUp(url,'580','360','','Download Forms');

//}

});


Thank you