1
I need to find a way to exchange data-id and data-content information to . number and . step automatically, without having to depend on Hover().
I need to maintain both the automatic form of this exchange as if it were a presentation and the Hover() if the user wants to remain in the view of a specific information.
I believe I’ve made myself clear
JS
$(function(){
$('.nav-metodologia img').hover(function(){
var getID = $(this).data('id');
var getContent = $(this).data('content');
$('.number').html(getID);
$('.passo').html(getContent);
//console.log(pegaId);
});
});
HTML
<div class="nav-metodologia pull-right slide-here">
<img src="images/01.png" data-id="1" data-content="conteudo 01"/>
<img src="images/02.png" data-id="2" data-content="conteudo 02"/>
<img src="images/03.png" data-id="3" data-content="conteudo 03"/>
</div><!-- /.nav-metodologia -->
<div class="box-metodologia">
<div class="number radius-2">1</div>
<div class="passo">
<p>Conteúdo inicial</p>
</div><!-- /.box-metodologia -->
</div><!-- /box-metodologia -->
Pablo, how many
.number
and.passo
are there? one per image or only one of each? What do you mean by automatic? = > when the page loads?– Sergio
There are 7 of each, it is happening the same thing that happens nowadays but without having to use the Hover() first, when load the page already start to rotate 1 in 1 step as if the person is passing the mouse
– Pablo Campina