Subversion Repositories SmartDukaan

Rev

Rev 26512 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

$(function() {
        $(".product-detail").live('click', function() {
                loadItems("main-content");
        });
        $(".product-info").live(
                        'click',
                        function() {
                                console.log(itemCatalogId);
                                doAjaxRequestHandler(context + "/getProductInfo?catalogId="
                                                + itemCatalogId, "GET", function(response) {
                                        $('.product-info-container').html(response);
                                        $("#campareItem").hide();
                                });
                        });

        $(".campare-with").live('click', function() {
                $("#campareItem").show();
        });

        $(".product-compare-info").live(
                        'click',
                        function() {
                                doAjaxRequestHandler(context
                                                + "/getProductCompareInfo?catalogId=" + itemCatalogId
                                                + "&catalogId=" + campareItemCatalogId, "GET",
                                                function(response) {
                                        console.log(response)
                                                        $('#' + "main-content").html(response);
                                                });
                        });
});

function loadItems(domId) {
        doAjaxRequestHandler(context + "/getProducts", "GET", function(response) {
                $('#' + domId).html(response);
        });

}