Make LiteBox work for application/xhtml xml and text/html


/ Published in: JavaScript
Save to your folder(s)

Directions: be sure to set to absolute paths every image location from your litebox-1.0.js and lightbox.css files... and, replace the setInnerHTML function with this one...
http://www.doknowevil.net/litebox/


Copy this code and paste it in your HTML
  1. // http://www.doknowevil.net/litebox/
  2. setInnerHTML: function(element,content) {
  3. element = $(element);
  4. if(element.hasChildNodes()) {
  5. element.removeChild(element.firstChild);
  6. }
  7. content = document.createTextNode(content);
  8. element.appendChild(content);
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.