nathansobo/space-pen — pull request #4 by metaskills (2012-02-14 02:35:05+00:00)
Title: Use element data vs. attributes for space-pen attach trigger hints.

Like issue #2, this keeps space-pen attributes out of the markup, but for attach triggers. This does a few things.

1) Stores the "spTriggerAttachEvent" string in data(). Uses a "sp" prefix for space-pen to avoid conflicts.

2) It changes triggerAttachEvent() to work with the data attribute. Note this function also has a subtle change where it has an extra existential operator at the beginning `if element?` since I found that in some odd cases where my dom sublists were empty the append was passing undefined. Could not track down by, so thought the extra guard was just OK.

All tests pass.