JSFiddle - React, Tailwind, and code Playground

by drublic

HTML

<p>Test for FF 3.6 : remove element</p>
<div id="content">TEST</div>
<a href="#" class="remove">Remove</a>

JavaScript

$( '#content' ).append( $( '<div />', {
    'id' : 'test',
    'html' : 'Works!'
})
                        );

$( '.remove' ).click( function( e ) {
    e.preventDefault();
   var $el = $( this );
    
  
    // Set path for deeplinking
  if ( typeof( window.history.pushState ) == "function" ) {
    window.history.pushState( null, $el.text(), $el.attr( 'href' ) );
  } else {
    var id = $el.attr( 'href' ).split( '/' );
        id = id[ id.length - 2];
    location.hash = '#/' + id;
  }
    
    if ( $el.hasClass( 'active' ) ) {
    return;
  }
    $.get( '/67Jzs/9/', function () {  
        $( '#test' ).remove();
    });
})