Bug Tracker

Opened 8 years ago

Closed 8 years ago

#10596 closed bug (invalid)

JQuery Ajax always fail while loading a cs sfile

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:

Description

If you try something like:

$.ajax({

url: url , dataType: "css" , crossDomain: true , success: function() {

$("head").append("<link rel='stylesheet' href='" + url + "' type='text/css'/>");

}

});

it will always fail.

Change History (1)

comment:1 Changed 8 years ago by Rick Waldron

Component: unfiledajax
Priority: undecidedlow
Resolution: invalid
Status: newclosed

There is no dataType "css" see: http://api.jquery.com/jQuery.ajax/

If you want to load CSS, I recommend: https://github.com/jaubourg/ajaxHooks

Note: See TracTickets for help on using tickets.