Saturday, June 29, 2013

Cake or IE9?

Not sure if this is a Cake issue or just stupid IE.

 

I have a small snip of js code that works in all browsers except IE9.

 

I am doing an ajax request and sending the data to colorbox. Nothing overly hard there. But it will not open up in IE and I looked everywhere and nothing seems to be the same as the problem I am having here.

 

I can open a blank colorbox, but as soon as push the json data back from Cake it just sits there. Looking at the FireBug in IE and nothing, request sent and that’s it. No response, no error just sits there.

 

JS:

$("a.portfolio").live('click', function(e){

                                e.preventDefault();

                               

                                $.ajax({

                                                type: "GET",

                                                url: $(this).attr("href"),

                                                cache: false,

                                                dataType: 'json',                                              

                                                success: function(r) {

                                                               

                                                                $.colorbox({href:basePath + r.slide,open:true,rel:'gallery',photo : true,

                                                                                onLoad : function(){

                                                                                                $('a.prev, a.next').fadeOut(1000);

                                                                                },

                                                                                onCleanup : function(){

                                                                                                $('.lightboxInfo').hide();

                                                                                                $('a.prev, a.next').fadeIn(1000);

                                                                                },

                                                                                onClosed : function(){

                                                                                                $('.lightboxInfo').hide();

                                                                                }

                                                                });

                                                }

                                });

                });

 

No comments: