I’m trying to hide all table rows that don’t contain the string “Marc” from a js widget loaded from an external url.
<script type="text/javascript">
id = "ki1120mmvd";
name = "schedules";
document.write(unescape("%3Cscript src='http://healcode.com/javascripts/hc_widget.js' type='text/javascript'%3E%3C/script%3E"));
</script>
I’ve been able to hide some elements within the table rows with css using the class id or attribute but it looks like I need js/jquery/php to completely eliminate the rows and everything I’ve found hasn’t worked.
Here is a link to where I grabbed the code:
http://www.funkydoor.com/studio_polk_street.html
Here is how I’m using it:
http://www.marcmatisyoga.com/schedule.html
The
:containsselector is the perfect choice. But, in your specific case, there is some more effort to be done in order to make it work. In my tests, it seems that due to some broken URL’s in the external script that are loaded dynamically,jQueryor$areundefined. The workaround is to reload thejQueryAPI after the table (and the other external scripts) loads.[UPDATE]
I’m re-posting the whole content of a
.htmlfile which I believe it renders the correct structure (for me, it works in Chrome). There are still some necessary modifications you’ll have to do in order to achieve your desired font color and URL formatting, which you can implement byjQuery‘s.css()function, as I did below. Please note that:<style>...</style>tag andwaitForFncfunction in the<body>‘s<script>tag, just after the external script is loaded dynamically.I apologize for the need of horizontal scrolling to see the full
jQuerystyle formatting, but it’s not really relevant to the solution up to the point when you would like to modify it apply your own formatting.