2012-06-15 4 views
0

Я пытаюсь показать определенный div в colorbox, но вместо этого целая страница поставляется в colorbox. вот мой HTML кодprob с показом div в colorbox

<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> 

здесь функция

$(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

Colorbox Установите опцию в ColorBox как

$("a[rel='example1']").colorbox({inline:true});  
Смежные вопросы