I have a table element in HTML which resizes dynamically. Whenever the table resizes, i want to perform some operations for rest of the application members to adjust themselves according to the table. How can I achieve it? Thanks in advance.
Asked
Active
Viewed 77 times
2 Answers
0
You can use onresize attribute in your table
here is example
<table onresize="myFunction()">
<thead>
</thead>
<tbody>
</tboady>
<tablel>
Put function in script
<script>
myFunction() {
alert('resize working');
}
</script>
Now you can work on myFunction whenever resize your table.
Hope this help you

Jalay Oza
- 772
- 7
- 11
-
relevent: http://stackoverflow.com/questions/15792498/is-it-bad-practice-to-use-inline-event-handlers-in-html – online Thomas May 22 '17 at 12:03
-
okay, happy to help you incase if you have any problem in code in future :) – Jalay Oza May 22 '17 at 12:06
0
You can add an attribute to your table
<table onresize="yourFunction()">
yourFunction() - function which will be called, when table resizes.
Or you can do it in JavaScript , using the addEventListener() method:
object.addEventListener("resize", yourFunction);

Степан Швець
- 1
- 1