kornelski / slip

Slip.js — UI library for manipulating lists via swipe and drag gestures
BSD 2-Clause "Simplified" License
2.44k stars 213 forks source link

Altered the regex for items being swiped. #7

Closed kylekellogg closed 10 years ago

kylekellogg commented 10 years ago

I know this is a really stupid thing to do, but that regex was perturbing me. This matches all the same patterns, but it'll do it without giving some poor sap (like me!) a nosebleed.

kornelski commented 10 years ago

Sorry, this will match "notslip-swiping-container".

kylekellogg commented 10 years ago

Fair point. Closing issue.

kornelski commented 10 years ago

Anyway, thanks for the PR. I agree that the regex is ugly. What do you think about replacing it with HTML5's shiny new classList?

kylekellogg commented 10 years ago

I was going to suggest classList earlier, but I know I saw it would have issues on IE <10 and opera mini. Perhaps a data-* attribute, since this is, essentially, just a bool flag?

The regex works, so no change is necessary really.