Is there a way to automatically trigger an Angular element click event upon page load?
$scope.fetchMealInfo = function (incomingDate) {
angular.element(".trackNext a").on("click", function () {
//alert(offset.left);
console.log("inside click event");
if (contentDiv.scrollLeft() < (offset.left - 317)) //contentDiv.scrollLeft(contentDiv.scrollLeft() + 254);
contentDiv.animate({
scrollLeft: contentDiv.scrollLeft() + 317
});
});
plzzer();
}
The function called plzzer is defined as:
window.plzzer=function() {
console.log("inside plzzer");
angular.element(".trackNext a").trigger("click");
}