I have the following code which I render through a partial that display a strength title and a strength summary
<div id="strengths" class="row">
<% FR_STRENGTHS.each do |strength| %>
<div class="col-xs-12 col-sm-6 col-md-4">
<div >
<h3 class="jobtitle text-center"> <%= strength[1]["title"] %></h3>
<div class="text-justify strength_summary">
<p> <%= strength[1]["summary"] %></p>
</div>
</div>
</div>
<% end %>
</div>
Details of the strengths are in yml files for translation purposes (I have the same code as above for English language pending params). I want to hide the strength summary and show it when the user hover the strength title using Jquery, but I can't have it working.
following jQuery propagation documentation I have used this js code:
$(document).ready(function() {
$('#strengths').on("mouseenter", "h3",
function() {
$('.strength_summary').slideDown();
},
function() {
$('.strength_summary').slideUp();
}
);
});
In any case I don't think using a class as a selector for the "strength_summary" would work as I assume all sections would slide down when hovering on any h3? But it's impossible to use ids so... Thanks for your help!