2010-04-20 7 views
1

모든 링크를 hslide 클래스로 타겟팅하고이를 첨부해야합니다. 어떤 jquery 전문가가이 일을하는 법을 알고 있습니까?inclick을 눈에 잘 띄지 않는 jquery로 변경하십시오.

onclick="return hs.expand(this, { slideshowGroup: 'groupC0', wrapperClassName: 'rounded-white', outlineType : 'rounded-white', dimmingOpacity: 0.8, align : 'center', transitions : ['expand', 'crossfade'], fadeInOut: true });" 

감사합니다, C

답변

5
$(document).ready(function() { 
    $('a.hslide').click(function() { 
     return hs.expand(this, { 
      slideshowGroup: 'groupC0', 
      wrapperClassName: 'rounded-white', 
      outlineType : 'rounded-white', 
      dimmingOpacity: 0.8, 
      align : 'center', 
      transitions : ['expand', 'crossfade'], 
      fadeInOut: true 
     }); 
    }); 
}); 
+0

이것이 기능을 손상시키는 것 같습니다. 조금 더 살펴볼 것입니다. –

+0

은 중단 점을 설정하고 3 행에서'this '값을 검사합니다. –

1

는 jQuery를 함께 선택하고 익명 함수에 onclick 이벤트를 추가, 그 객체에 클래스를 설정합니다.

$(document).ready(function() { 
    $(INSERT CLASS HERE).click(function() { 
     return hs.expand(this, { 
      slideshowGroup: 'groupC0', 
      wrapperClassName: 'rounded-white', 
      outlineType : 'rounded-white', 
      dimmingOpacity: 0.8, 
      align : 'center', 
      transitions : ['expand', 'crossfade'], 
      fadeInOut: true 
     }); 
    }); 
}); 
관련 문제