Ticket #8729 (closed bug: invalid)
$('body') selector bug on IE9
| Reported by: | DesTVTS | Owned by: | DesTVTS |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.next |
| Component: | selector | Version: | 1.5.1 |
| Keywords: | ie9 | Cc: | |
| Blocking: | Blocked by: |
Description
Hello,
With IE9, if i want append, prepend or another to the body with selector $('body'), i get error. Work on IE7,IE8,Chrome,Safari,Firefox
//Generate
var tip;
tip = self.opts.template;
tip = tip.replace('%id%', self.opts.tipId);
tip = tip.replace('%msg%', content);
tip = tip.replace('%arrow-type%', self.opts.arrowType);
//Append
$('body').prepend(tip); <-- Fatal error
if i change 'body' by an element ex: '#tmpl-global' => work
Error msg
Détails de l’erreur de la page Web Agent utilisateur : Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C) Horodateur : Thu, 31 Mar 2011 15:18:59 UTC Message : Objet appelant non valide Ligne : 1 Caractère : 1 Code : 0 URI : http://www.mouratimmobilier.fr/nous_contacter_sur_tout_l-immobilier.html Message : Objet appelant non valide Ligne : 16 Caractère : 55942 Code : 0 URI : http://www.mouratimmobilier.fr/js/jquery.min.js?version=20110331144300
Change History
comment:1 follow-up: ↓ 2 Changed 2 years ago by timmywil
- Keywords ie9 added
- Owner set to DesTVTS
- Status changed from new to pending
comment:2 in reply to: ↑ 1 Changed 2 years ago by anonymous
Replying to timmywil:
Thank you for taking the time to submit a bug report to the jQuery project! Please provide a reduced test case that reproduces your issue on http://jsfiddle.net using jQuery(edge). In this case, it is hard to know exactly what "tip" is.
Hello,
ex:
var tip = '<div style="top: 665.833px; left: 936.5px; opacity: 1; display: block;" class="mi-tips" id="tips-form-error-contact_name"><div class="mi-tips-left-top"><div class="mi-tips-right-bottom"><div class="mi-tips-left-bottom"><div class="mi-tips-right-top"><p class="mi-tips-content">Le champ « Nom prénom » est nécessaire.</p></div></div><span class="mi-tips-arrow mi-tips-arrow-top"> </span></div></div></div>';
On jsfiddle.net, i dont have the error. I dont understand why on my site i have. i force IE9 to emulate IE8 temporarily.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thank you for taking the time to submit a bug report to the jQuery project! Please provide a reduced test case that reproduces your issue on http://jsfiddle.net using jQuery(edge). In this case, it is hard to know exactly what "tip" is.