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");


Comments

  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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  6. Thanks for your interesting information's in this blog is very much useful
    for me to improve my knowledge for more information about Wedding Planner Services in South Delhi

    ReplyDelete
  7. Thanks for posting this informative things to people. This is really helpful for readers.
    Window Ac Repairing Service in Delhi NCR

    ReplyDelete
  8. Thanks for your interesting information's in this blog is very much useful
    for me to improve my knowledge for more information about Home Nursing Services in Janakpuri

    ReplyDelete
  9. Thanks for posting this informative things to people. This is really helpful for readers.
    Building Contractors Service Provider In Delhi NCR

    ReplyDelete
  10. Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal.keep it up.
    Ai & Artificial Intelligence Course in Chennai
    PHP Training in Chennai
    Ethical Hacking Course in Chennai Blue Prism Training in Chennai
    UiPath Training in Chennai

    ReplyDelete
  11. We are event planners providing all necessary arrangements at reasonable prices. .Visit here : Best Catering Service Provider in Baharain

    ReplyDelete
  12. nice blog !! then i found this blog, this is really nice and interested to read.
    Event Organizers in South Delhi
    Event Organizers in Delhi NCR

    ReplyDelete
  13. Thank you so much for sharing. Keep updating your blog. It will very useful to the many users
    Home Furniture Manufacturers in South Delhi
    Home Furniture Manufacturers in Delhi NCR

    ReplyDelete

Post a Comment

Popular posts from this blog

defining functions clojure

Integrating Struts2 with Spring Security using Custom Login Form