Y
Y
Yuri Lobanov2014-02-02 14:39:41
JavaScript
Yuri Lobanov, 2014-02-02 14:39:41

jquery append in ie7?

Hello.
I use this method to customize the appearance of the twitter widget:
habrahabr.ru/post/189170
But JQuery append does not work in ie7

$body.attr("id", "twitterStyled")
.append($("#twitterStyle"));

I found a lot of questions on the Internet on stackoverflow.com and on other sites, but either my poor knowledge of the language is to blame, or the issue is really not resolved.
So far through
if (!document.all || document.querySelector) {
  twtr_body.append(twtr_style);
}

I determine that the browser is not ie7 and accordingly execute append. In principle, I only change the style of the header and the follow button there, so this option is also acceptable, but natural perfectionism does not allow me to leave everything like that.
I ask for help, who faced?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Lobanov, 2014-02-02
@iiil

The solution was found, I have a read-only account on Habré, whoever can - please throw it in the comments there, maybe it will come in handy for someone.

if (!document.all || document.querySelector) {
  twtr_body.append(twtr_style);
 }
else {
  twtr_body.append('<style type="text/css" id="twitterStyle">' + twtr_style.html() + '</style>');
}

Once again, the link habrahabr.ru/post/189170

B
bahek2462774, 2014-02-02
@bahek2462774

Press f12 - , there is a Javascript console - and write the error that it gives from there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question