C# Part 5c How to handle a right click mouse down JavaScript click listener event

preview_player
Показать описание
How to handle a right click event on an element in a web page using the mouse down click listener. Uses jQuery and a c# .net controller to handle partial page updates.
Рекомендации по теме
Комментарии
Автор

Thanks for all these fantastic videos. Loving them.

The preventDefault() function is not available on "mousedown". At least not in my version. I got around that be leaving the "click" event there which only calls preventDefault();. Maybe this will help someone. 🙂

$(document).on("click", ".game_button", function (event) {
event.preventDefault();
})

conradtheart
welcome to shbcf.ru