Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only first tooltip is working #2813

Closed
net1957 opened this issue Jul 19, 2013 · 1 comment
Closed

Only first tooltip is working #2813

net1957 opened this issue Jul 19, 2013 · 1 comment

Comments

@net1957
Copy link

net1957 commented Jul 19, 2013

Based on the Railscasts http://railscasts.com/episodes/417-foundation?view=asciicast

with

    <div class="row collapse">
      <div class="small-3 columns">
        <%= f.label :name, class: "right inline", title: "Name of product", data: {tooltip: true } %>
      </div>
      <div class="small-9 columns">
        <%= f.text_field :name %>
      </div>
    </div>


    <div class="row collapse">
      <div class="small-3 columns">
        <%= f.label :price, class: "right inline", title: "Price in USD", data: {tooltip: true } %>
      </div>
      <div class="small-9 columns">
        <%= f.text_field :price %>
      </div>
    </div>

The 2 tooltips display the value from the first (Name of product)

using zurb-foundation (4.2.3) gem

Still present in 4.3.0

Each time you reload the page, all tooltips display the same text as the first .
unless the first all others display also the standard browser tooltip with the correct text!! (Firefox 22.0, Jquery 1.10.2, win XP).

So only the first tooltip is really working

@mrsweaters
Copy link
Contributor

Thanks for reporting. If a value of data-tooltip is set then this value is used to identify the tooltip itself. Since in this case both are data-tooltip="true" when generated, both point to the same tooltip.

Try this:

    <div class="row collapse">
      <div class="small-3 columns">
        <%= f.label :name, class: "right inline", title: "Name of product", data: {tooltip: "name" } %>
      </div>
      <div class="small-9 columns">
        <%= f.text_field :name %>
      </div>
    </div>


    <div class="row collapse">
      <div class="small-3 columns">
        <%= f.label :price, class: "right inline", title: "Price in USD", data: {tooltip: "price" } %>
      </div>
      <div class="small-9 columns">
        <%= f.text_field :price %>
      </div>
    </div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants