ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comพัฒนาเว็บไซต์CMS & Free Scriptwordpress , woocommerce ทำแบบนี้ได้มัย...
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: wordpress , woocommerce ทำแบบนี้ได้มัย...  (อ่าน 700 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
mr.zatan
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 51
ออฟไลน์ ออฟไลน์

กระทู้: 1,163



ดูรายละเอียด
« เมื่อ: 07 ตุลาคม 2015, 09:31:03 »

wordpress , woocommerce ทำแบบนี้ได้มัย...


- ขยับ Cursor ไปด้านซ้ายรูปจะเปลี่ยน
- ขยับ Cursor ไปด้านขวารูปก็จะเปลี่ยน


รวมเป็น 3 รูป

เหมือนของเว็บนี้  equalli.com


*** หามา 2 วันแล้วไม่เจอเลย...
บันทึกการเข้า
thaicoffin
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 41
ออฟไลน์ ออฟไลน์

กระทู้: 1,128



ดูรายละเอียด เว็บไซต์
« ตอบ #1 เมื่อ: 08 ตุลาคม 2015, 21:27:46 »

เข้ามาดู ทำได้ด้วยเหรอครับ
บันทึกการเข้า

deadclosed
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 133
ออฟไลน์ ออฟไลน์

กระทู้: 1,553



ดูรายละเอียด เว็บไซต์
« ตอบ #2 เมื่อ: 08 ตุลาคม 2015, 22:09:33 »

โค๊ด:
<li class="item last">
<div class="prod_img_block">
                <a href="http://www.equalli.com/best-sellers/amsterdam-ring-lgbt-sterling-silver-rainbow-sapphire.html" title="AMSTERDAM RING IN STERLING SILVER by EQUALLI.COM by EQUALLI.COM" class="product-image">
                   
<img src="http://www.equalli.com/media/catalog/product/cache/1/thumbnail/400x400/9df78eab33525d08d6e5fb8d27136e95/2/0/2015_05_15_192g-s-r1482-925_2_1.jpg" alt="test" class="img_left" style="opacity: 0;">
<img src="http://www.equalli.com/media/catalog/product/cache/1/small_image/400x/9df78eab33525d08d6e5fb8d27136e95/2/0/2015_05_15_194g-s-r1482-925_1_3.jpg" alt="AMSTERDAM RING IN STERLING SILVER by EQUALLI.COM by EQUALLI.COM" class="img_default" style="opacity: 1;">
<img src="http://www.equalli.com/media/catalog/product/cache/1/thumbnail/400x400/9df78eab33525d08d6e5fb8d27136e95/2/0/2015_05_15_193g-s-r1482-925_2_1.jpg" alt="test" class="img_right" style="opacity: 0;">

               
</a>
</div>
                <div class="product-info" style="min-height: 105px;">
                    <a href="http://www.equalli.com/best-sellers/amsterdam-ring-lgbt-sterling-silver-rainbow-sapphire.html" title="AMSTERDAM RING IN STERLING SILVER">
                    <h2 class="product-name" style="font-size:14px;">
                        AMSTERDAM RING IN STERLING SILVER                    </h2>
                       

                       
    <div class="price-box">
                                                                <span class="regular-price" id="product-price-993">
                                            <span class="price">$220.00</span>                                    </span>
                       
        </div>

   <div class="price-box">
                                                                <span class="regular-price" id="product-price-1220">
                                            <span class="price"></span>                                    </span>
                       
</div>
                    </a>


                    <div class="actions">
                                                    <!--a title="" class="button" href=""></a-->
                                               
                    </div>
                </div>

            </li>

ภาพสามภาพซ้อนทับกัน โดยให้ภาพกลางเป็น defalt กำหนดค่าเป็น opacity : 1 ส่วนภาพอื่น เป็น 0
จากนั้นใช้ จาวาสคริป กำหนดว่า จะให้แอด style opacity 1 เมื่อ mouse over
woocommerse คงต้องเขียนเพิ่มมั้งครับ

เว็บตัวอย่างเป็น magento ครับ
 wanwan017 wanwan017
« แก้ไขครั้งสุดท้าย: 08 ตุลาคม 2015, 22:11:13 โดย deadclosed » บันทึกการเข้า
wasantec
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 586
ออฟไลน์ ออฟไลน์

กระทู้: 2,613



ดูรายละเอียด
« ตอบ #3 เมื่อ: 08 ตุลาคม 2015, 22:18:58 »

โค๊ด:
<li class="item last">
<div class="prod_img_block">
                <a href="http://www.equalli.com/best-sellers/amsterdam-ring-lgbt-sterling-silver-rainbow-sapphire.html" title="AMSTERDAM RING IN STERLING SILVER by EQUALLI.COM by EQUALLI.COM" class="product-image">
                   
<img src="http://www.equalli.com/media/catalog/product/cache/1/thumbnail/400x400/9df78eab33525d08d6e5fb8d27136e95/2/0/2015_05_15_192g-s-r1482-925_2_1.jpg" alt="test" class="img_left" style="opacity: 0;">
<img src="http://www.equalli.com/media/catalog/product/cache/1/small_image/400x/9df78eab33525d08d6e5fb8d27136e95/2/0/2015_05_15_194g-s-r1482-925_1_3.jpg" alt="AMSTERDAM RING IN STERLING SILVER by EQUALLI.COM by EQUALLI.COM" class="img_default" style="opacity: 1;">
<img src="http://www.equalli.com/media/catalog/product/cache/1/thumbnail/400x400/9df78eab33525d08d6e5fb8d27136e95/2/0/2015_05_15_193g-s-r1482-925_2_1.jpg" alt="test" class="img_right" style="opacity: 0;">

               
</a>
</div>
                <div class="product-info" style="min-height: 105px;">
                    <a href="http://www.equalli.com/best-sellers/amsterdam-ring-lgbt-sterling-silver-rainbow-sapphire.html" title="AMSTERDAM RING IN STERLING SILVER">
                    <h2 class="product-name" style="font-size:14px;">
                        AMSTERDAM RING IN STERLING SILVER                    </h2>
                       

                       
    <div class="price-box">
                                                                <span class="regular-price" id="product-price-993">
                                            <span class="price">$220.00</span>                                    </span>
                       
        </div>

   <div class="price-box">
                                                                <span class="regular-price" id="product-price-1220">
                                            <span class="price"></span>                                    </span>
                       
</div>
                    </a>


                    <div class="actions">
                                                    <!--a title="" class="button" href=""></a-->
                                               
                    </div>
                </div>

            </li>

ภาพสามภาพซ้อนทับกัน โดยให้ภาพกลางเป็น defalt กำหนดค่าเป็น opacity : 1 ส่วนภาพอื่น เป็น 0
จากนั้นใช้ จาวาสคริป กำหนดว่า จะให้แอด style opacity 1 เมื่อ mouse over
woocommerse คงต้องเขียนเพิ่มมั้งครับ

เว็บตัวอย่างเป็น magento ครับ
 wanwan017 wanwan017


ตามนี้ครับจะมีรูป 3 รูป แล้วก็ใช้ jQuery ด้านล่างนี้ครับ


โค๊ด:
<script>
jQuery(document).ready(function(){
jQuery('.prod_img_block a').mousemove(function(e){
var left_part = jQuery(this).offset().left;
var right_part = jQuery(this).offset().right;
        var x = e.pageX - left_part;
        var y = e.pageY - jQuery(this).offset().right;
        //jQuery('.prod_img_block a').html("X: "   x   " Y: "   y);
var product_width = jQuery(this).width();
var product_width_half = product_width/2;
if (x < product_width_half) {
jQuery(this).find(".img_left").css("opacity", "1");
jQuery(this).find(".img_default").css("opacity", "0");
jQuery(this).find(".img_right").css("opacity", "0");
}
if (x > product_width_half) {
jQuery(this).find(".img_left").css("opacity", "0");
jQuery(this).find(".img_default").css("opacity", "0");
jQuery(this).find(".img_right").css("opacity", "1");
}

    });
jQuery('.prod_img_block a').mouseout(function(){
jQuery(this).find(".img_left").css("opacity", "0");
jQuery(this).find(".img_default").css("opacity", "1");
jQuery(this).find(".img_right").css("opacity", "0");
});
jQuery('a.linker').click(function(){
var read_more_height = jQuery( jQuery(this).attr('href') ).offset().top - 150;
jQuery('html, body').animate({
scrollTop: read_more_height
}, 500);
return false;
});

});
</script>
บันทึกการเข้า
hahaoo
ก๊วนเสียว
*

พลังน้ำใจ: 20
ออฟไลน์ ออฟไลน์

กระทู้: 396



ดูรายละเอียด เว็บไซต์
« ตอบ #4 เมื่อ: 09 ตุลาคม 2015, 08:06:00 »

โห อ่านและงงเลย เหอๆ  Tongue
บันทึกการเข้า

mr.zatan
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 51
ออฟไลน์ ออฟไลน์

กระทู้: 1,163



ดูรายละเอียด
« ตอบ #5 เมื่อ: 09 ตุลาคม 2015, 08:26:12 »

ไม่เก่งด้าน Code ซะด้วยสิ.....น่าจะมีปลั๊กอินเนอะ wanwan017
บันทึกการเข้า
หน้า: [1]   ขึ้นบน
พิมพ์