Results 1 to 2 of 2

Thread: trouble accessing a pseudo element

Threaded View

  1. #1
    Join Date
    Nov 2005
    Bundanoon: first village to ban bottled water

    Question trouble accessing a pseudo element

    I have a bunch of elements formed this way:
    HTML Code:
    <p class="T">some text</p>
    and some css:
    .T:after { position:relative; visibility:hidden; content: " more text." }
    Having trouble accessing "T:after" to change the visibility. Something like:
    var elT = document.getElementsByClassName("T")
    function changeT() {
    	for (i=0; i<elT.length; i++) {
    if (elT.item(i).firstChild:after.style.visibility == "hidden") {
    		elT.item(i).firstChild:after.style.visibility = "visible") }	
    Any suggestions?
    Last edited by ctoz; 09-12-2009 at 03:50 AM. Reason: additional code

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center