- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 27 Sep 2010 21:09:28 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/scripts In directory hutz:/tmp/cvs-serv21066/scripts Modified Files: w3c-validator.js Log Message: add a link inside legend elements Index: w3c-validator.js =================================================================== RCS file: /sources/public/2002/css-validator/scripts/w3c-validator.js,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- w3c-validator.js 27 Sep 2010 21:02:54 -0000 1.3 +++ w3c-validator.js 27 Sep 2010 21:09:26 -0000 1.4 @@ -51,10 +51,12 @@ //creating links on legends, with event listeners W3C.Legends.each(function(legend, i){ + var html = legend.innerHTML; var pid = W3C.Sections[i].id.replace(/-/g, '_'); var opt = '+with_options'; + legend.set('html', '<a href="#'+ pid + opt + '">' + html + '</a>'); var option = W3C.Options[i]; - var link = legend; + var link = legend.getFirst(); link.addEvent('click', function(event){ option.setStyle('display', 'block'); // before any slide effect, set display:block var block = (option.getStyle('margin-top').toInt() == 0);
Received on Monday, 27 September 2010 21:09:30 UTC