dataMap.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. $(function() {
  2. //=================li标签切换=====================
  3. $('.tab_content .tab_list').eq(0).show();
  4. $('ul.information>li').click(function(){
  5. $(this).addClass('borb2').siblings().removeClass('borb2');
  6. var index = $(this).index();
  7. $('.tab_content .tab_list').hide().eq(index).show();
  8. // var length = $('#record>div>table').eq(index).find('tr').length;
  9. // for(var i=0;i<length;i++) {
  10. // var the = $('#record>div>table').eq(index).find('tr').eq(i).find('td').eq(1);
  11. // if(the.html() == '买入'){
  12. // the.addClass('g');
  13. // }else if(the.html() == '卖出'){
  14. // the.addClass('p');
  15. // }
  16. // }
  17. });
  18. //=====================================
  19. $('#bottom>dl').click(function(){
  20. if($(this).hasClass('act') == false){
  21. $(this).addClass('act');
  22. $(this).find('dt>img').attr('src','images/collect1.png').parent('dt').next('dd').html('已收藏')
  23. }else{
  24. $(this).removeClass('act');
  25. $(this).find('dt>img').attr('src','images/collect2.png').parent('dt').next('dd').html('添加自选')
  26. }
  27. });
  28. });