Example:
Here is a link to an image that might be found on my page
[HTML]<a href="images/blah.jpg" target="_self" class="media"><img src="images/blah.jpg" /></a>[/HTML]
One way I was thinking of doing it was the function "replace". something like this
Expand|Select|Wrap|Line Numbers
- javascript:document.body.innerHTML.replace("Index","67890");
Expand|Select|Wrap|Line Numbers
- //Create an array
- var allPageTags = new Array();
- function doSomethingWithClasses(theClass) {
- //Populate the array with all the page tags
- var allPageTags=document.getElementsByTagName("*");
- //Cycle through the tags using a for loop
- for (i=0; i<allPageTags.length; i++) {
- //Pick out the tags with our class name
- if (allPageTags[i].className==theClass) {
- //Manipulate this in whatever way you want
- allPageTags[i].style.display='none';
- }
- }
- }
[HTML]<a href="images/blah.jpg" target="_self" class="media" rel="lightbox"><img src="images/blah.jpg" /></a>[/HTML]