JSFiddle - React, Tailwind, and code Playground

by BRANIS

HTML

<script src="https://where-to-buy.co/Scripts/jquery-1.6.1.min.js"></script>
<script src="https://where-to-buy.co/Scripts/jquerycounter.js"></script>
<script src="https://where-to-buy.co/Scripts/knockout-2.1.js"></script>
<script src="https://where-to-buy.co/Scripts/jquery.tools-1.2.5.min.js"></script>
<script src="https://where-to-buy.co/Scripts/jquery.qtip-1.0.0-rc3.js"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="ctl00_Head1">
    <title>8711600322080 </title>   
    <!-- TradeDoubler site verification 1851666 -->
</head>
<body>
    <div class="page">
        <div id="main">
            <div class="OneBySevenBin2">
                <div class="OneBySevenBin2middle">
                    <ul>
                        <form action="/widgets/onebysevenbin2fb/8711600322080" method="post">
                        <input name="__RequestVerificationToken" type="hidden" value="VvM3tTWAnpvJ43AewDJpOOb+a7MXbaH73KdLgfUFSL5bMW8p3CRtO/DIm85/IZsCheW4tNy6+SJRMCuF3mtrYFquPXI+F76YsDLXfQIK9dgmC6eWA/hF4USP4umBNjWDdsEKoHKHhpP2ahc9nYpOc3w4AzmassgwG/kbOE0YMg8=" />
                        <div class="divTitleArea">
                            <p>
                            </p>
                        </div>
                        <div class="stepOne">
                            
                            <li>
                                <div class="w6392597">
                                    <img id="108660" src="https://where-to-buy.co/content/images/logos/tesco88x31.png"
                                        alt="" />
                                    <img style="float: left;" src="https://where-to-buy.co/content/images/pixel1.png"
                                        height="1" width="1" border="0" alt="" />
                                </div>
                            </li>
                            <li>
                         ...

CSS

*
{
    margin: 0;
    padding: 0;
}
img
{
    border: none !important;
    margin: 0 !important;
}
h1
{
    font-family: arial;
    font-weight: bold;
    font-size: 24px;
    color: #333;
}
h2
{
    color: #333;
    font-family: arial,sans-serif;
    line-height: normal;
    margin: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    text-align: left;
}
.outofstock
{
    float: left;
    padding-left: 24px;
    padding-right: 0;
    padding-top: 9px;
}
.instock
{
    float: left;
    padding-left: 24px;
    padding-right: 0;
    padding-top: 9px;
}
.retailerlogo
{
    float: left;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 5px;
    margin-left: 0;
}
.retailerlogo1
{
    float: left;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 5px;
    margin-left: 0;
}
.buyitnow
{
    float: left;
    padding-left: 0;
}
.buynow
{
    float: left;
    padding-left: 23px;
    margin-top: 18px;
}
.OneBySevenBin2
{
    width: 478px;
    height: 642px;
}
body
{
    width: 478px;
}
.page
{
    width: 478px;
}
#main
{
    width: 478px;
}
.OneBySevenBin2middle
{
    margin: 0;
    width: 572px;
    height: 737px;
    padding-left: 30px;
    padding-top: 30px;
    background-image: url('https://where-to-buy.co/content/images/dove2widgetbackground3.png');
    background-position: top left;
    background-repeat: no-repeat;
    float: left;
}

.divTitleArea
{
    background: url("https://where-to-buy.co/content/images/addthisproductimage.png") no-repeat scroll center center;
    height: 60px;
    margin-left: 18px;
    margin-top: 33px;
    width: 475px;
}

.divTitleAreaOutOfStock
{
    background: url("https://where-to-buy.co/content/images/noproductmessage.png") no-repeat scroll center center;
    height: 60px;
    margin-left: 18px;
    margin-top: 33px;
    width: 475px;
}

.stepOne
{
    background: url("https://where-to-buy.co/content/images/step1image.png") no-repeat scroll 0 0 transparent;
    float:...

JavaScript

//<![CDATA[
	    $(document).ready(function () {
	        var Bin2ViewModel = function () {
	            var self = this;
	            this.selectedRetailerGroup = ko.observable();
	            this.selectedGroupOption = ko.observable();
	            this.selectedGroupOption.subscribe(function (newVal) {
	                var items = $.grep(self.availableGroups(), function (item) { return item.retailerproductId() == newVal; });
	                self.selectedRetailerGroup(items[0]);
	            });
	            this.selectedGroup = ko.observable();
	            this.availableGroups = ko.observableArray(
	[new RetailerViewModel("108660", "£2.60"),
  new RetailerViewModel("332527", "£2.89"),
  new RetailerViewModel("373455", "£1.92"),
	 ]);
	        }
	        var RetailerViewModel = function (retailerproductId, price) {
	            this.retailerproductId = ko.observable(retailerproductId);
	            this.price = ko.observable(price);
	        }
	        ko.applyBindings({ bin2ViewModel: ko.observable(new Bin2ViewModel()) });
	        $(function () {
	            $("input[name$='retailerGroup']").click(function () {
	                $(".radioOptions").attr(
	  'disabled', 'disabled'
	 );
	                $(".radioOptionsA").css("opacity", "0.3")
	                $(".radioOptionsA-checked").css("opacity", "1")
	                $("#108660").css("opacity", "0.5")
	                $("#332527").css("opacity", "0.5")
	                $("#373455").css("opacity", "0.5")
	                var rpSelected = $("#retailerProductId").val();
	                $('#' + rpSelected).css("opacity", "1");
	            });
	        });
	    });
	//]]>


//<![CDATA[
    $(document).ready(function () {
        var manufacturerWidgetId = "270";
        var productId = "6572";
        var countryId = "230";
        var theUrl = "http://dove.where-to-buy.co/Widgets/Impression/270/6572/230/9r45r80";
        $.getJSON(theUrl + "?callback=?", {}, callback);

        function callback(data) {
 ...