JSFiddle - React, Tailwind, and code Playground

by fergal_doyle

HTML

<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.css">
<body ng-app='myApp'>
    <div data-role="page" ng-controller='myCtrl' id="test">
        
        <button ng-click="add()">Add one</button>
        
        <ul data-role="listview">
            <li ng-repeat='car in cars'> <a href="{{car}}.html">{{car}}</a>

            </li>
        </ul>
    </div>
</body>

JavaScript

var app = angular.module('myApp', []);

    app.controller('myCtrl', function ($scope) {
        $scope.cars = [
            'acura', 'audi', 'BMW'
        ];
        
        $scope.add= function(){
           $scope.cars.push("Another"); 
            setTimeout(function(){
                
                $("#test").enhanceWithin();
                
                //module.$page.trigger("create");
                //$results.listview("refresh");
               // console.log( $('[data-role="listview"]').data());
               // $('[data-role="listview"]').listview("refresh");
                
                
            },0);
        };        
        
    });