...">

Changing table border with jQuery?

I have a table generated from Sphinx that has a border of width 1.

<table border="1" class="docutils">

Is it possible to change the border width to 0 using jQuery / javascript?

+3
source share
3 answers

Yes, you can. You want to use the attr () function like this ...

$('table.docutils').attr('border', '0');
+7
source

I would like to use a function .css()as opposed to .attr()... for example:

$("table.docutils").css('border', 'none');

:)

+3
source

use

 document.getElementById('myTable').border="0"
<table border="1" class="docutils" id="myTable">
+1
source

Source: https://habr.com/ru/post/1781585/


All Articles