Joined October 2012
·

Luke Hopkins

Waterlooville
·
·
·

It would be neater to keep classes for styling and using another attribute for JS:

<a class="btn" data-hook="popup">Click Me</a>

But $('[data-hook="popup"]') is pretty ugly and long-winded so I guess we're stuck with classes for now. :(

Good tip though, I often end up coupling styling and JS and then breaking stuff when I change styling at a later date.

Why would you want to target one device specifically? These days we should be building sites device-agnostic surely?

Ctrl + F -> "-device" -> Replace All with ""

Plus testing in a browser is never as good as on the real thing.

Posted to Responsive Design Mode in Firefox over 1 year ago

@juju57 No worries, I spent a good 2 minutes hitting Ctrl + Alt + M with nothing happening, then I realised you'd put Cmd. Hehe

Posted to Responsive Design Mode in Firefox over 1 year ago

For the benefit of Windows users:

Ctrl + Shift + M

Good point, didn't notice because I develop in Firefox :p will edit now. Thanks for the input :)

Achievements
47 Karma
2,694 Total ProTip Views
Interests & Skills