JSFiddle - React, Tailwind, and code Playground

by niphor

HTML

<script src="http://swfupload.googlecode.com/svn/swfupload/tags/swfupload_v2.2.0_core/swfupload.js"></script>
<div id="wrapper">   
    <div id="swf">  
                        
</div><span id="spanButtonPlaceHolder"></span>
</div>
        <button id="btn1">Ckick to run :$("[someVlaue=1234]")</button>
        <br />
        <button id="btn2">Ckick to run $("#wrapper").remove()</button>
        <br />
        <button id="btn3">Ckick to run $("object")[0].getAttribute("data")</button>

JavaScript

$(function(){
    var settings = {
        flash_url : "http://demo.swfupload.org/v220/swfupload/swfupload.swf",
        upload_url: "http://swfupload.googlecode.com/svn/swfupload/trunk/samples/demos/simpledemo/upload.php",
        file_size_limit : "100 MB",
        file_types : "*.*",
        file_types_description : "All Files",
        file_upload_limit : 100,
        file_queue_limit : 0,
        debug: false,

        // Button settings
        button_image_url: "http://swfupload.googlecode.com/svn/swfupload/trunk/samples/demos/simpledemo/images/TestImageNoText_65x29.png",
        button_width: "65",
        button_height: "29",
        button_placeholder_id: "spanButtonPlaceHolder",
        button_text: '<span class="theFont">Hello</span>',
        button_text_style: ".theFont { font-size: 16; }",
        button_text_left_padding: 12,
        button_text_top_padding: 3,
    };

    swfu = new SWFUpload(settings);
    
    
    //loadFlash();
    
    $("#btn1").bind("click",function(){
        $("[someVlaue=1234]");
    });
    
    $("#btn2").bind("click",function(){
        $("#wrapper").remove();
    });
    
    $("#btn3").bind("click",function(){
        console.log($("object")[0].getAttribute("data"));
    });
});

//https://code.google.com/p/swfupload/source/browse/swfupload/trunk/core/swfupload.js

var loadFlash = function () {
        var targetElement, tempParent;
    
        // Get the element where we will be placing the flash movie
        targetElement = document.getElementById("swf");


        var wrapperType = (targetElement.currentStyle && targetElement.currentStyle["display"] || window.getComputedStyle && document.defaultView.getComputedStyle(targetElement, null).getPropertyValue("display")) !== "block" ? "span" : "div";
        
        // Append the container and load the flash
        tempParent = document.createElement(wrapperType);
        tempParent.innerHTML = getFlashHTML();     // Using innerHTML is non-standard but the only...