Solved

remove style attribute jquery

Posted on 2014-03-11
2
854 Views
Last Modified: 2014-03-12
Hi

I have a table that is pulled in dynamically from another website. It is pulled in with javascript.

The table it produces has lots of inline styles with !important and i want all these removed so i can style myself.

I tried to use jquery to remove them but i dont think it works because the html is generated by javascript itself. How can i solve this?

The table is on this page:
http://ekcfc.openwaterdesign.com/

it is under "league table"

Thanks
0
Comment
Question by:coolispaul
2 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39921690
jQuery("#block-block-10 table *").prop("style","")

Open in new window

0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 39921785
Use :
<script type="text/javascript">
jQuery(window).load(function() {
     //jQuery("#block-block-10 table").removeAttr("style border cellspacing cellpadding");
     jQuery("#block-block-10 table").removeAttr("style");
});
</script>

Open in new window

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question