开发者

jQuery Lightbox Clone is not initialising properly

Help...?

Hey, I have the following function on an onClick call:

   function addComment() {
        jQuery.noConflict();
        jQuery('head').append('<link rel="stylesheet" media="screen" type="text/css" href="colorbox/colorbox-images.css" />'); //this doesn't add correc开发者_如何转开发tly.
        jQuery.fn.colorbox({inline:false, href:'boxes/add-comment.html'}); //or it could be this line not importing the page
        return false;
    };

However, the STYLESHEET append line doesn't seem to initialise properly. (NOTE: it may be that the content from "boxes/add-comment.html" aren't being added) - Screenshots below:


have you tried,

var link = $('<link>');
link.attr({
   'rel':'stylesheet',
   'media':'screen',
   'type':'text/css',
   'href':'colorbox/colorbox-images.css'
});
jQuery('head').append(link);


Turns out that it was a Float problem in the CSS, something didn't want to play ball.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜