Question

J'utilise twitter boostrap (Twipsy) pour mettre en œuvre infobulle pour mon application web. Je veux ajouter un retard dans l'affichage des infobulles (par exemple au bout de 2 secondes).

Ma mise en œuvre est la suivante (voir délai)

%li.friend
  %a{:href=>"#!/<%=nick%>/<%=question_slug%>", :rel=>"twipsy", :title=>"<%=nick%>&#39;s answers for this question", :delay=> {show:2000}}
    %img{src: "<%= avatar_url %>"}

Cependant, l'info-bulle apparaît toujours immédiatement quand je mouseover sur l'avatar.

Des conseils sur la façon dont je peux mettre en œuvre le retard d'affichage pour l'info-bulle?

Était-ce utile?

La solution

Essayez ceci:

%li.friend
  %a{:href=>"#!/<%=nick%>/<%=question_slug%>", :rel=>"twipsy", :title=>"<%=nick%>&#39;s answers for this question", :delay=> {show:2000, hide: 0}}
    %img{src: "<%= avatar_url %>"}

Ou si vous voulez aussi un délai pour cacher:

%li.friend
  %a{:href=>"#!/<%=nick%>/<%=question_slug%>", :rel=>"twipsy", :title=>"<%=nick%>&#39;s answers for this question", :delay=> 2000}
    %img{src: "<%= avatar_url %>"}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top