Use jQuery for DOM manipulation. Add loading class for placeholders when they are loading.
Fix code style.