Senin, 09 Juni 2014

jQuery Chaining

Well, this is simple post.

I just want to tell you about chaining jquery.

This is essential method to code with jquery. Most of beginner code look like this;

$('#element').width(400);
$('#element').height(200);


I think above code is bad practice. When you are dealing with tons of code, It look like mess.

The best code should look like this (chaining);

$('#element').width(400).height(200);

Tidak ada komentar:

Posting Komentar

Cara Mengetahui Besar Database PostgreSQL Tanpa Mendownloadnya

Berikut adalah langkah-langkah untuk mengetahui ukuran semua database di instance PostgreSQL yang berjalan di dalam kontainer Docker: 1. Men...