- Posts: 2
Postings
You can freely browse the forum and post in the community forum.
However, you need a valid license to write posts for support (own a valid commercial software license or have purchased a support membership).
Posts only show once reviewed. This is mainly preventive to keep spam away. Thank you for your understanding!
Jquery doesnt work in ie and chrome
- AlioG
-
Topic Author
- New Member
-
Less
More
IP: 71.60.83.147
13 years 9 months ago #1681
by AlioG
Jquery doesnt work in ie and chrome was created by AlioG
I have a piece of code that sizes an element written in jquery:
$(document).ready(function(){
var width = $('#contenttd').width();
if(width > 2000){
$('#toplog').width(width);
}
});
It works fine in firefox but doesn't work in chrome or ie and the javascript console doesnt show any errors.
I could really use some help
$(document).ready(function(){
var width = $('#contenttd').width();
if(width > 2000){
$('#toplog').width(width);
}
});
It works fine in firefox but doesn't work in chrome or ie and the javascript console doesnt show any errors.
I could really use some help
- admin
-
- Administrator
-
Less
More
- Posts: 1931
IP: 207.229.131.129
13 years 9 months ago #1682
by admin
Olivier.
Replied by admin on topic Re: Jquery doesnt work in ie and chrome
Hello,
it probably depends on what else in on your page. For instance, if you have MooTools libraries loaded, this will fail because MooTools will take over the '$' of jQuery.
If that is the case, use
jQuery.noConflict();
and replace the first line of your code with
jQuery(document).ready(function($) {
it probably depends on what else in on your page. For instance, if you have MooTools libraries loaded, this will fail because MooTools will take over the '$' of jQuery.
If that is the case, use
jQuery.noConflict();
and replace the first line of your code with
jQuery(document).ready(function($) {
Olivier.
- AlioG
-
Topic Author
- New Member
-
Less
More
- Posts: 2
IP: 71.60.126.113
13 years 9 months ago #1683
by AlioG
Replied by AlioG on topic Re: Jquery doesnt work in ie and chrome
Okay, that seems to be working, thank you very much.
- admin
-
- Administrator
-
Less
More
- Posts: 1931
IP: 207.229.131.129
13 years 9 months ago #1684
by admin
The following user(s) said Thank You: mvaughan
