JavaScript show by sliding effect HTML First Column on button click show hide div sliding effect

May be you could change the display type of row from table-row to block or inline-block. and then apply any animations. it will work. However you will have to adjust the width yourself then. which shouldn't be as difficult with JS.

Answer:1

Forgive me if this looks dirty to you, but you can give it a try.

$('.menuBtn').click(function (event) {

    if(jQuery('table.fixed-row').length > 0){
      jQuery('table.fixed-row').remove();
    }
    var $table = jQuery('table.whole');
    var $fixedtr = $table.clone().insertBefore($table).addClass('fixed-row');
    $fixedtr.find('tr:not(:first-child)').remove();

    jQuery('table.whole tr:first-child').css('display','none');
    jQuery('table.whole.fixed-row tr:first-child').css('display','table-row');
    value = $('.whole').css('right') === '-100px' ? 0 : '-100px';
    $('.whole.fixed-row').animate({
        right: value
    });

});
.whole {
    position: relative;
    Width:100%;
}
.menu {
    left: 0;
}

.whole span {
    position: relative;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="menuBtn">click</div>
<table class="whole" border="1px">
    <tr>
        <th class="menu">Delete</th>
        <th>Data1 c</th>
        <th>date2 c</th>
    </tr>
    <tr>
        <td class="menu">
            <input type="checkbox" value="Bike">
        </td>
        <td>data</td>
        <td>date1</td>
    </tr>
    <tr>
        <td class="menu">
            <input type="checkbox" value="car">
        </td>
        <td>data2</td>
        <td>date3</td>
    </tr>
</table>
Answer:2

I thought I remembered seeing a toggle method that you could toggle between but I can't remember where I saw it now so I'll do an alternative for you :)

$('.menuBtn').click(function(e){
    e.preventDeafult();
    var direction=($('.whole').hasClass('out'))?"+=100px":"-=100px";
    $('.whole').animate({'right':direction},500,function(){if(!$(this).hasClass('out'))$(this).addClass('out');else $(this).removeClass('out');});
});

But as stated above by others I don't think table rows are able to be positioned in that way? Other ways is to use slideIn() or use width instead? There are many ways. Good luck!

Answer:3

What is this code doing? How is it executing? What is x equal to? Another useful type of higher-order function modifies the function value it is given: function negate(func) { return function(x) { ...

What is this code doing? How is it executing? What is x equal to? Another useful type of higher-order function modifies the function value it is given: function negate(func) { return function(x) { ...

  1. does this function have an inverse
  2. does this function converge
  3. does this function have an inverse calculator
  4. does this function have a maximum or a minimum
  5. does this function converge or diverge
  6. what does this function mean
  7. does function of beauty work
  8. does function of beauty actually work
  9. does function of beauty really work
  10. does function of beauty contain silicones
  11. does function of beauty have silicones
  12. does function
  13. does function have vertical asymptote
  14. does function mean in math

I'm not even sure if this is possible but I want to get the height of the contents in a container. Let's assume I have <div id="container" style="min-height:100vh"> <div class="child">...

I'm not even sure if this is possible but I want to get the height of the contents in a container. Let's assume I have <div id="container" style="min-height:100vh"> <div class="child">...

  1. jquery height of div contents
  2. jquery get iframe contents height
  3. jquery get height of contents
  4. jquery contents height
  5. iframe content height jquery

I've been battling with this for hours now and read several threads on SO and other places, but have hit a dead end. I am trying to scrape a web page and one of the items I need is a text file that is ...

I've been battling with this for hours now and read several threads on SO and other places, but have hit a dead end. I am trying to scrape a web page and one of the items I need is a text file that is ...

  1. text file download
  2. downloading text file java
  3. downloading a text file from a website
  4. curl downloading text file
  5. android download text file
  6. pdf downloading as text file
  7. video downloading as text file
  8. content type for downloading text file

Good day fellow Stack-ers, I must ask your pardon if this question has been asked before or if it seems elementary (I am only a Javascript novice). I have been doing w3c js challenges lately: Write ...

Good day fellow Stack-ers, I must ask your pardon if this question has been asked before or if it seems elementary (I am only a Javascript novice). I have been doing w3c js challenges lately: Write ...