JSFiddle - React, Tailwind, and code Playground

by karthick6891

HTML

<!--- worklight bootstrap -->

JavaScript

function wlCommonInit(){

	/*
	 * Application is started in offline mode as defined by a connectOnStartup property in initOptions.js file.
	 * In order to begin communicating with Worklight Server you need to either:
	 * 
	 * 1. Change connectOnStartup property in initOptions.js to true. 
	 *    This will make Worklight framework automatically attempt to connect to Worklight Server as a part of application start-up.
	 *    Keep in mind - this may increase application start-up time.
	 *    
	 * 2. Use WL.Client.connect() API once connectivity to a Worklight Server is required. 
	 *    This API needs to be called only once, before any other WL.Client methods that communicate with the Worklight Server.
	 *    Don't forget to specify and implement onSuccess and onFailure callback functions for WL.Client.connect(), e.g:
	 *    
	 *    WL.Client.connect({
	 *    		onSuccess: onConnectSuccess,
	 *    		onFailure: onConnectFailure
	 *    });
	 *     
	 */
	
	
	// Common initialization code goes here

	 $.mobile.defaultPageTransition = "slide";
	 $.support.cors = true;
	 $.mobile.allowCrossDomainPages = true;
	 var logger = WL.Logger.create({	pkg : "FPLPoc" });
     logger.log("Initializing");
	 
     $( "#login" ).click(function() {
		 logger.log("login clicked");
	 });
     
     $( "#beginTrack" ).click(function() {
    	logger.log("begin tracking");
    	$.mobile.changePage("#mapPage", {
			reverse: true
		});
     });
     
     
     $( document ).on( "pagecreate", "#mapPage", function() {
     	logger.log("page create");
     	console.log("page create");
 	    var defaultLatLng = new google.maps.LatLng(26.891454,-80.056);  // Default to Florida
			var marker;
			var zoom;
			        var myOptions = {
 	            zoom: zoom,
 	            mapTypeId: google.maps.MapTypeId.ROADMAP
 	        };
 	        var map = new google.maps.Map(document.getElementById("map-canvas"), myOptions);
 	    if ( navigator.geolocation ) {
 	        function success(pos) {
 	           ...