How to retain the space of the td after hidding it in Jquery

If you use the following code snippet to hide and show tds- the UI will get disturbed.
The next corresponding td will get shifted to the hidden td space.
  var tablevar="#"+myTable;
 $(tablevar+' tr:eq('+i+')').find('td:eq(3)').show();
   $(tablevar+' tr:eq('+i+')').find('td:eq(2)').show();

So how to retain the td space and still achieve the functionality.
use the this code snippet.
  var tablevar="#"+myTable;
$(tablevar+' tr:eq('+i+')').find('td:eq(3)').css("visibility", "hidden");
 $(tablevar+' tr:eq('+i+')').find('td:eq(2)').css("visibility", "hidden");

 $(tablevar+' tr:eq('+i+')').find('td:eq(4)').css("visibility", "visible");


  1. Woah this blog is wonderful i like studying your posts. Keep up the great work! You understand, lots of persons are hunting around for this info, you could help them greatly.

    java training in tambaram | java training in velachery

    java training in omr | oracle training in chennai

    java training in annanagar | java training in chennai

  2. I think you have a long story to share and i am glad after long time finally you cam and shared your experience.
    python training in pune
    python online training
    python training in OMR

  3. Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    Devops training in velachery
    Devops training in annanagar
    Devops training in sholinganallur

  4. I think you have a long story to share and i am glad after long time finally you cam and shared your experience.
    Blueprism training in tambaram

    Blueprism training in annanagar

  5. Thanks for such a great article here. I was searching for something like this for quite a long time and at last I’ve found it on your blog. It was definitely interesting for me to read  about their market situation nowadays.

    angularjs Training in bangalore

    angularjs Training in btm

    angularjs Training in electronic-city

    angularjs online Training

    angularjs Training in marathahalli

  6. Does your blog have a contact page? I’m having problems locating it but, I’d like to shoot you an email. I’ve got some recommendations for your blog you might be interested in hearing.
    AWS Training in Chennai |Best Amazon Web Services Training in Chennai
    AWS Training in Rajaji Nagar | Amazon Web Services Training in Rajaji Nagar

    Best AWS Training Institute in BTM Layout Bangalore ,AWS Coursesin BTM

  7. A universal message I suppose, not giving up is the formula for success I think. Some things take longer than others to accomplish, so people must understand that they should have their eyes on the goal, and that should keep them motivated to see it out til the end.

    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

  8. I read this post two times, I like it so much, please try to keep posting & Let me introduce other material that may be good for our community.
    Microsoft Azure online training
    Selenium online training
    Java online training
    Python online training
    uipath online training


Post a Comment

Popular posts from this blog

Jquery Table Inline Edititing

Spring MVC- Redirect from one controller to another