`pointer-events: none;`

I was doing some front end work these days and I had to “disable” a link with some JS code. I had a class to style the link, but it was still clickable.
I googled for disabling a link and found this css trick. I didn’t know it until then.

.disabled {
  pointer-events: none;
}

That solved my problem, simple as that.

 
2
Kudos
 
2
Kudos

Now read this

3-state Boolean field

I’ve been through a piece of code today that reminded me this specific case on Rails Migrations: add_column :table_name, :column_name, :boolean How does that look to you? Ok? Well, it seems ok, right? If that wasn’t a boolean field, it... Continue →