Common.js: Perbedaan antara revisi

Dari GBI Danau Bogor Raya
Lompat ke: navigasi, cari
Leo (bicara | kontrib)
upd
 
Leo (bicara | kontrib)
k upd
 
Baris 1: Baris 1:
$('button').click(function(){ //you can give id or class name here for $('button')
$('button').click(function(){ //you can give id or class name here for $('button')
    $(this).text(function(i,old){
$(this).text(function(i,old){
        return old=='+' ?  '-' : '+';
return old=='+' ?  '-' : '+';
    });
});
});
});

Revisi terkini sejak 27 Oktober 2022 23.45

$('button').click(function(){ //you can give id or class name here for $('button') $(this).text(function(i,old){ return old=='+' ? '-' : '+'; }); });