I'm trying to automatically run an ajax url when my page is fully loaded using .load() function. It seems my code doesn't work.
Other information:
The code is used for tracking affiliate users and is provided on the website for merchant users
I'm not sure of the
jqueryversion but I know my version doesn't accept$, but onlyjQuery
The code:
$(window).load(function() {
$.ajax({
url: "https://shareasale.com/sale.cfm?amount=99.00&tracking=15&transtype=sale&merchantID=xxxxx"
});
});
Did I miss something? Thanks in advance.
.load()was remove in JQuery v3. What version are you using?