在彩盒中显示div的概率

时间:2012-06-15 18:15:50

标签: jquery colorbox

我正在尝试在彩色框中显示特定的div,而是整个页面出现在colorbox中。这是我的HTML代码

<div id="right">
    <div id="photo_preview">
        <a rel="example1" href="#photo_preview"><img class="photo_preview_image" src="female.png"></img></a>
        <label class="photo_preview_caption">Caption</label>
        <input class="photo_preview_caption_input" type="text" name="caption_" size="30" value=""></input>
        <input class="photo_preview_album_art" type="radio" name="album_art" title="Album Art" value=""></input>
        <img class="photo_preview_delete_image" src="Dustbin.PNG" title="Click To Delete Pic"></img>
    </div>
</div>

这里是colorbox功能

 $(document).ready(function(){
    //Examples of how to assign the ColorBox event to elements
    $("a[rel='example1']").colorbox(

    );

    //Example of preserving a JavaScript event for inline calls.
    $("#click").click(function(){ 
        $('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
        return false;
    });
});

1 个答案:

答案 0 :(得分:1)

在colorbox中设置一个选项,如

$("a[rel='example1']").colorbox({inline:true});