다음을 시도해보십시오. 다음 쿼리를 사용하여 표시 가격을 변경하고 주문에 대한 직접 링크를 변경하십시오. JQUERY는 변경 가격 및 주문 링크를 토글합니다.
function changepricing() {
jQuery("#monthly").slideToggle();
jQuery("#monthly1").slideToggle();
jQuery("#montly2").slideToggle();
jQuery("#monthly3").slideToggle();
jQuery("#monthly4").slideToggle();
jQuery("#halfyear").slideToggle();
jQuery("#halfyear1").slideToggle();
jQuery("#halfyear2").slideToggle();
jQuery("#halfyear3").slideToggle();
jQuery("#halfyear4").slideToggle();
jQuery("#annual").slideToggle();
jQuery("#annual1").slideToggle();
jQuery("#annual2").slideToggle();
jQuery("#annual3").slideToggle();
jQuery("#annual4").slideToggle();
jQuery("#biannual").slideToggle();
jQuery("#biannual1").slideToggle();
jQuery("#biannual2").slideToggle();
jQuery("#biannual3").slideToggle();
jQuery("#biannual4").slideToggle();
jQuery("#prcmonthly1").slideToggle();
jQuery("#prcmonthly2").slideToggle();
jQuery("#prcmonthly3").slideToggle();
jQuery("#prcmonthly4").slideToggle();
jQuery("#prchalfyear1").slideToggle();
jQuery("#prchalfyear2").slideToggle();
jQuery("#prchalfyear3").slideToggle();
jQuery("#prchalfyear4").slideToggle();
jQuery("#prcannual1").slideToggle();
jQuery("#prcannual2").slideToggle();
jQuery("#prcannual3").slideToggle();
jQuery("#prcannual4").slideToggle();
jQuery("#prcbiannual1").slideToggle();
jQuery("#prcbiannual2").slideToggle();
jQuery("#prcbiannual3").slideToggle();
jQuery("#prcbiannual4").slideToggle();
}
쇼 변경 가격 코드
인가 :
이 <li id="monthly1" class="pricing_header2" style="display:block;">€1 <span>/1 mo.</span></li>
<li id="halfyear1" class="pricing_header2" style="display:none;">€2 <span>/6 mos.</span></li>
<li id="annual1" class="pricing_header2" style="display:none;">€3 <span>/One yr.</span></li>
<li id="biannual1" class="pricing_header2" style="display:none;">€4 <span>/Two yrs.</span></li>
<li id="prcmonthly1" class="pricing_footer" style="display:block;"><span><a href="link1" class="pricing_button">{$LANG.product_buy_now}</a></li>
<li id="prchalfyear1" class="pricing_footer" style="display:none;"><span><a href="link2" class="pricing_button">{$LANG.product_buy_now}</a></li>
<li id="prcannual1" class="pricing_footer" style="display:none;"><span><a href="link3" class="pricing_button">{$LANG.product_buy_now}</a></li>
<li id="prcbiannual1" class="pricing_footer" style="display:none;"><span><a href="link4" class="pricing_button">{$LANG.product_buy_now}</a></li>
위의 코드 잘 작동 난 단지 사용하는 경우 : 표시 가격과 주문 링크는
<li id="monthly" class="pricing_header2" style="display:block;"><a href="#" onclick="changepricing();return false;"><span>1 Month </span></a></li>
<li id="halfyear" class="pricing_header2" style="display:none;"><a href="#" onclick="changepricing();return false;"><span>6 Months </span></a></li>
<li id="annual" class="pricing_header2" style="display:none;"><a href="#" onclick="changepricing();return false;"><span>{$LANG.product_choose_one} </span></a></li>
<li id="biannual" class="pricing_header2" style="display:none;"><a href="#" onclick="changepricing();return false;"><span>{$LANG.product_choose_two} </span></a></li>
2 개 제품은 3 개 또는 4 개 제품을 사용하면 작동하지 않습니다. 어떤 도움을 줄 수 있습니까? 정말 고마워.
감사합니다, 마누엘
당신은 들여 쓰기를해야합니다 우리가 시도하고 이해할 수있는 자바 스크립트 코드 –
당신의 변화 추산 방법은 나를 괴롭 히지 만, 대신 클래스를 통해 선택함으로써 적절하게 정리할 수 있습니다. $ (". pricing_header2")와 같은 것. slideToggle(); –
안녕하세요, pricing_header는 jwery가 아닌 CSS 시트입니다. jquery의 코드는 다음과 같습니다 : 예 : id = "monthly1". 동일한 코드가 두 제품에서 작동하지만 4에서는 작동하지 않습니다. 어떤 생각입니까? 감사합니다 – Manuel