Exemple #1
0
<?php

require_once '../include/header.php';
require_once '../lib/Kendo/Autoload.php';
?>

<div class="demo-section">
    <div class="product-display">
        <img class="product-image" src="../content/web/colorpicker/sofa-ffcc33.jpg" alt="" width="285" height="149">

<?php 
$colorChooser = new \Kendo\UI\ColorPalette('color-chooser');
$colorChooser->tileSize(30)->change('preview')->value('#ffcc33')->palette(array('#ddd1c3', '#d2d2d2', '#746153', '#3a4c8b', '#ffcc33', '#fb455f', '#ac120f'))->change('onChange');
echo $colorChooser->render();
?>
<script>
    function onChange() {
        var colorId = this.value().substring(1);
        $(".product-image").attr("src", "../content/web/colorpicker/sofa-" + colorId + ".jpg");
    }
</script>
    </div>

    <div class="product-info">
        <h3>Natural Linen Loveseat</h3>
        <p>Add comfortable seating to your living room or den. The soft foam in the cushions make this loveseat a great place to relax.</p>
        <dl>
            <dt>Dimensions</dt>
            <dd>34" D x 52" W x 31" H</dd>

            <dt>Materials</dt>