12 Mayıs 2016 Perşembe

JQuery Enter Key (Input alanda Enter basılması durumunda istenilen fonksiyonun Çalıştırılması)

 (function ($) {
        $.prototype.enterPressed = function (fn) {
            $(this).keyup(function (e) {
                if ((e.keyCode || e.which) == 13) {
                    fn();
                }
            });
        };
    }(jQuery || {}));

    $("input").enterPressed(function () {
        Sorgula();
    });

Hiç yorum yok: