Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

modal slide from right

//bootstrap modal
<div id="my_modal" class="modal fade modal-md" role="dialog" data-keyboard="false" data-backdrop="static">
  <div class="modal-dialog" style="margin-right:-39%;">
    <!-- Modal content-->
    <div class="modal-content" style="margin-top:-6%; margin-bottom: -6%;">
      <div class="modal-header">
        <button type="button" class="close">&times;</button>
      </div>
      <div class="modal-body">
            <p>Modal body.....</p>
      </div>
    </div>
  </div>
</div>

jQuery(".modal_open_button").click(function(){
    jQuery("#my_modal").modal('toggle');
    let height = $(window).height();
    jQuery("#my_modal .modal-dialog .modal-content").css('height', height+10+'px');
    setTimeout(function(){
        jQuery("#my_modal .modal-dialog").css({'-webkit-transform':'translateX(-100%)', 'transition': 'transform .5s ease'});
    }, 200);//wait 2 seconds
});

jQuery("#my_modal .modal-dialog .modal-content .modal-header .close").click(function(){
    jQuery("#my_modal .modal-dialog").css({'-webkit-transform':'translateX(-0%)', 'transition': 'transform .5s ease'});
    setTimeout(function(){
        jQuery("#my_modal").modal('hide');
    }, 500);
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: sort array based on multiple columns javascript 
Javascript :: find string length javascript 
Javascript :: how to use msg.send instead of msg.reply discord.js javascript 
Javascript :: get number of digits in a number 
Javascript :: angular input date pattern validation 
Javascript :: create a customer in stripe node.js 
Javascript :: render partial in js.erb 
Javascript :: sequelize findall 
Javascript :: datatable set data of column 
Javascript :: push json data into a list of objects in flutter 
Javascript :: node fs 
Javascript :: javascript select audio device 
Javascript :: sort object properties by value javascript 
Javascript :: take string until react 
Javascript :: javascript function with string parameter 
Javascript :: uncaughtException javascript 
Javascript :: use cors 
Javascript :: object.keys javascript 
Javascript :: Replace symbol if it is preceded and followed by a word character js 
Javascript :: git reset local branch to origin 
Javascript :: lunix increae ram available to nodejs 
Javascript :: nodejs get appdata path 
Javascript :: rad client datasource refetch 
Javascript :: summer note empty 
Javascript :: hash url owl carousel example 
Javascript :: javascaript 
Javascript :: react axios Card List 
Javascript :: this.jsObject.functions is not a function 
Javascript :: normal function vs arrow function in javascript 
Javascript :: send as form data with boundry axios 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =