This is default featured post 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Tampilkan postingan dengan label javascript. Tampilkan semua postingan
Tampilkan postingan dengan label javascript. Tampilkan semua postingan

Senin, 01 Agustus 2011

Javascript Trim

String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
return this.replace(/\s+$/,"");
}

Jumat, 17 Desember 2010

javascript Cache in firefox


Sometimes firefox wan't let cache even script is updated. to release it we can clear all cache. So, if you feel you have update the script but nothing happens in firefox. It's time to see your firebug->net->script and watch your header



Rabu, 24 November 2010

Membatalkan jQuery ajax request

Sebenernya gak Cuma jQuery, tapi ajax secara keseluruhan.

var x = $.ajax({
type:
"POST",
url:
"some.php",
data:
"name=John&location=Boston",
success:
function(msg){
alert(
"Data Saved: " + msg );
}
});

//kill the request
x.abort()


Sumber : http://stackoverflow.com/questions/446594/kill-ajax-requests-using-javascript-using-jquery

Jumat, 19 November 2010

Agar jQuery object selalu bisa berfungsi setelah recreate

Seringkali object – object dicreate ulang untuk mendapatkan kesan interaktif. Tapi seringkali juga object – object tersebut kehilangan fungsi yang telah diikat/bind atas object itu. Untuk itu pada saat object selesai digunakan

  1. Unbind , misal jQuery(this).unbind() , perintah ini akan memastikan bahwa action telah hilang sehingga object bisa aman dihilangkan dari memory
  2. Remove, misal jQuery(this).remove(), setelah melakukan unbind, printah remove memastikan object sudah benar2 tidak ada lagi dilayar.


PERHATIAN : remove tanpa unbind() akan menyebabkan memory penuh, karena referensi action tidak bisa dibersihkan oleh javascript garbage collector.

Rabu, 03 November 2010

Sony Ericsson Android WebSDK is PhoneGap

http://developer.sonyericsson.com/wportal/devworld/search-downloads?cat=[1.716760,+1.706824,+1.706817]

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More