Frequently Used JQuery Codes

Thekoftte

Üye
15 Kas 2020
103
0
To save time in the software, I save the patterns I use constantly and copy and use instead of writing over and over. In this subject, I added some common JQuery codes. Those who forget the spelling or want to save time can find and use it by doing CTRL + F.

Documen-t ready: JQuery codes that will run when the page is loaded are written here.

Kod:
$ (documen-t) .ready (function () {
  // Codes
});

click event: Gives an event to click the object.

Kod:
$ ("selector"). click (function () {
   // action after click
 });

ajax: Allows php codes to run without r3freshing the page.

Kod:
 $ .ajax ({
    type: "POST",
    url: 'php_path',
    data: {data to send},
    success: function (incoming_data) {// if successful
        // action
    },
});

addClass/removeClass: Defines / deletes a class to the object

Kod:
$ ("selector"). addClass ("add_class");
$ ("selector"). removeClass ("to delete_class");

Source:https://www.turkhackteam.org/javascript/1942356-sik-kullanilan-jquery-kodlari-kopyala-kullan.html
Translator: @Thekoftte
 
Moderatör tarafında düzenlendi:
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.