jquery - How do I allow users to enlarge or decrease the size of a html table? -


well im working on little sound board project , added thing create website more dynamic

when click increase/decrease increases/descreases text size in buttons. unfortunately useless unless includes table resize , button resize.

here code in action: http://serverbc.ucoz.com/main.html
scroll bottom of page see buttons!

what need add work nicely?

btw! here code how did text:

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">            </script>     <div id="box1">     <font color=white>rrrr</font>     </div>      <script type="text/javascript">     $(document).ready(function(){      $(".increasefont,.decreasefont").click(function(){      var type=  $(this).val();       var curfontsize = $('#box1').css('font-size');       if(type=='increase'){        $('#box1').css('font-size', parseint(curfontsize)+1);        }      else{        $('#box1').css('font-size', parseint(curfontsize)-1);       }         });     });     </script>       <div><input type="button" value="increase" class="increasefont"></input></div>     <div><input type="button" value="decrease" class="decreasefont"></input></div> 

you using fixed width button class button. won't grow fixed width. remove width property button class , try.

:check http://jsfiddle.net/akhilrs/qxhkn/


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -