Twipsy options in data-* #377

Closed
marcalj opened this Issue Oct 6, 2011 · 14 comments

Projects

None yet

3 participants

@marcalj
marcalj commented Oct 6, 2011

Hi, I found really helpful to have a lot of twipsy elements. For example for any element with the title attribute defined. But due to design usability I need different placement for some of them.

So my proposal is similar as modal plugin. You can define <span title="foo text" data-placement="right"> and initially call with $("[title]").twipsy({live: true, placement: "left"}); so by default all twipsy has to be in left placement except for the elements with data-placement attribute.

What do you think?

@fat
Member
fat commented Oct 6, 2011

Yep, i've been thinking a lot about implementing data options like this for all classes. This will probably be coming with the 2.0 release

@marcalj
marcalj commented Oct 6, 2011

@fat Awesome! Looking forward for the 2.0 release. There's an updated schedule/roadmap for next releases?

@fat
Member
fat commented Oct 7, 2011

The wiki has a few notes but we'll add more to that this weekend :)

@marcalj
marcalj commented Oct 7, 2011

Cool! But... weekend is not for working!! ;)

@fat
Member
fat commented Oct 8, 2011

Ha -- well, actually both mark and i don't really get time during our regular work hours to hack on bootstrap, so this project has been all about the late nights and weekends (that's why it's made with so much <3).

@marcalj
marcalj commented Oct 8, 2011

Pure amateour :) I like it.
I thought you do it in your twitter work journal.. :P

Keep rolling!

@jscheel
jscheel commented Oct 18, 2011

Until the 2.0 release you can still do this. Here's what I am doing for now (coffeescript):

$('.twipsy-live').twipsy
  live: true
  placement: (thing, ctx) ->
    return if position = $(ctx).data('twipsy-placement') then position else 'above' 
@marcalj
marcalj commented Oct 18, 2011

Thanks @jscheel good hint!

@jscheel
jscheel commented Oct 18, 2011

You're welcome @marcalj!

@jscheel
jscheel commented Oct 25, 2011

Actually, I believe $(ctx) should be $(this) in the example above

@marcalj
marcalj commented Oct 25, 2011

There's a bug in the Twipsy code, see my comment:
#345 (comment)

@jscheel
jscheel commented Oct 25, 2011

Ahh, that's probably why it worked for me, then it didn't when I changed bootstrap versions, thx

@fat
Member
fat commented Oct 30, 2011

this is now supported in the dev branch and will be released with v1.4.0

@fat fat closed this Oct 30, 2011
@marcalj
marcalj commented Oct 31, 2011

Cool! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment