vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Database of Codes/Hacks/Mods :: Hide Last Edit Until Clicked - View Topic
Topic Rating: *****
Printable View
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Hide Last Edit Until Clicked (31st Mar 08 at 4:35pm UTC)
This code will hide the 'last edit' information until you click the work 'last edit'. When you click that, it will show the last edit information! {Smile}

No editting required! {Smile}

<script>
/*Hide Last Edit Until Clicked
Coded By Wrighty
Do Not Rip/Repost or Claim!*/
var i = get('i','tag');

function s_h(id){
    get(id,'id').style.display = (get(id,'id').style.display=='none')? '' : 'none';
}

for(a=0;a<i.length;a++){
    if(/lastedit/.test(i[a].className)){
        var x = 'last_edit-'+a;
        with(i[a]){
            style.display='none';
            innerHTML = i[a].innerHTML.replace(/last edit/i,'');
            id = x;
        }
        var _a = document.createElement('a');
        with(_a){
            appendChild(document.createTextNode('Last Edit'));
            onclick = function(){ s_h(x); };
        }
        _b = document.createElement('i');
        with(_b){
            appendChild(_a);
            appendChild(i[a].cloneNode(true));
        }
        i[a].parentNode.replaceChild(_b, i[a]);
        break;
    }
}
</script>


Global Footer
 Printable View

All times are GMT+0 :: The current time is 1:20am
Page generated in 0.1426 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums