The Lazy Log
  • Home
  • About Me
Subscribe
Tagged

html

A collection of 3 posts

html

Customize File upload control

Unlike other form controls such as textbox, checkbox or radio button, you'll find it hard to customize file upload control. The look and feel of this control is totally managed by the rendering browser. A simple customization like changing the button color or remove the text "Choose a file&

  • xuanchien
xuanchien Mar 28, 2015 • 2 min read
rails

Custom dialog for data-confirm in Rails

Every Rails developers might be already familiar with data-confirm attribute for a link. It is used to ask for user confirmation before executing the action on behalf of user. Here is one example <%= link_to "Delete", post_path(post), method: :delete, confirm: "Are you sure?"

  • xuanchien
xuanchien Oct 30, 2014 • 3 min read
html

Get width/height of invisible DOM elements

When working with elements in jQuery, you might need to get width/height of certain invisible DOM elements. By default, jQuery would return 0 in this case because it can not calculate the actual height() of that element. In order to solve this problem, I take advantage of jquery.actual

  • xuanchien
xuanchien Sep 1, 2014 • 1 min read
The Lazy Log © 2022
  • Data & privacy
  • Contact
Powered by Ghost