所以我有很多个人资料,因此很多div一次又一次地重复 现在我想用jquery定位一个类元素,并在同一个配置文件中为另一个类元素设置动画
in my case:
$(',profile_menu').click(function() {
$( ".profile_like" ).removeClass( "m_hidden" )
$(".profile_like").animate({
left: 0+'%'
},300);
问题是我只想定位同一个档案中的类。
我希望这个问题得到很好的描述。
<!-:::::::::::::::::::: Profile 1::::::::::::::::::::::::::::::::::::::::-->
<div class="profile_box">
<div class="profiles">
<div class="profile_icons">
<div class="profile_like m_hidden"></div>
<div class="profile_favorite m_hidden"></div>
<div class="profile_present m_hidden"></div>
<div class="profile_chat m_hidden"></div>
</div>
<div class="profile_spacer"></div>
<div class="info_container">
<div class="info_bar">
<div class="profile_name_spacer"></div>
<div class="profile_name"></div>
<div class="profile_city"></div>
</div>
<div class="profile_menu"></div>
</div>
</div>
</div>
<!-:::::::::::::::::::: Profile 2::::::::::::::::::::::::::::::::::::::::-->
<div class="profile_box">
<div class="profiles">
<div class="profile_icons">
<div class="profile_like m_hidden"></div>
<div class="profile_favorite m_hidden"></div>
<div class="profile_present m_hidden"></div>
<div class="profile_chat m_hidden"></div>
</div>
<div class="profile_spacer"></div>
<div class="info_container">
<div class="info_bar">
<div class="profile_name_spacer"></div>
<div class="profile_name"></div>
<div class="profile_city"></div>
</div>
<div class="profile_menu"></div>
</div>
</div>
</div>
<!-:::::::::::::::::::: Profile 3::::::::::::::::::::::::::::::::::::::::-->
<div class="profile_box">
<div class="profiles">
<div class="profile_icons">
<div class="profile_like m_hidden"></div>
<div class="profile_favorite m_hidden"></div>
<div class="profile_present m_hidden"></div>
<div class="profile_chat m_hidden"></div>
</div>
<div class="profile_spacer"></div>
<div class="info_container">
<div class="info_bar">
<div class="profile_name_spacer"></div>
<div class="profile_name"></div>
<div class="profile_city"></div>
</div>
<div class="profile_menu"></div>
</div>
</div>
</div>
<!-:::::::::::::::::::: Profile 4::::::::::::::::::::::::::::::::::::::::-->
...
...
...