Search code examples
jqueryspringjspcolorbox

How to Use ColorBox Example in Spring-Jquery Application?


In my Spring Application when click hyperlink Popup will Open. in that i'm choosing ColorBox Example

Actually in my Spring Application return Jsp file and here is my sample code.

function edit_onClick() {
$.ajax({
    url : "demo/editEvent",
    success : function(data, textStatus, jqXHR) {
        // So here is my Result coming on 'data'
        // How to give this data as ColorBox?????  
    }
});
}

Actually i'm checking all the code in colorbox plugin but i'm unable to find it..

So please help me anyone Experienced with colorbox Plugin.. how to give my response as colorbox??


Solution

  • Now You can try like this..

    You can add colorbox plugin and now add following code...

    function edit_onClick() {
    $.ajax({
        url : "demo/editEvent",
        success : function(data, textStatus, jqXHR) {
           $.colorbox({html:data});
        }
    });
    }