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

Backup Semua Database PostgreSQL dalam Container

Langkah 1: Identifikasi Container PostgreSQL Gunakan perintah docker ps untuk menemukan container PostgreSQL: docker ps Cata...