Forum Moderators: open

Message Too Old, No Replies

Jquery issue in IE

jquery, scrollpane, css, ie

         

raphlo2

5:14 pm on May 12, 2009 (gmt 0)

10+ Year Member



Hey guys,
I was wondering if any of you out there could help me out with something that's driving me nuts. I can't get the scrollpane on my website to work in IE. I keep getting this error to line 24 but it doesn't reference my index file or any of my js files. Anyone?

[edited by: whoisgregg at 6:31 pm (utc) on May 12, 2009]
[edit reason] Whoops, no URLs please. See TOS [webmasterworld.com] [/edit]

whoisgregg

6:32 pm on May 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey raphlo2,

If you'd like to post a short snippet of your code (perhaps the first 24 lines) we'd be happy to take a look at it. :)

raphlo2

6:59 pm on May 12, 2009 (gmt 0)

10+ Year Member



Absolutely. This works fine in firefox, safari, but not IE.

<snipped code>

[edited by: whoisgregg at 7:37 pm (utc) on May 12, 2009]
[edit reason] Whoops, no code dumps. Please see Sticky :) [/edit]

raphlo2

7:57 pm on May 12, 2009 (gmt 0)

10+ Year Member



ok. One more attempt. Here is are the first 24 lines of code. Error message in IE " Line: 24, Error: Invalid property type"
I'm pretty sure I need to put more code up there to figure this one out but the mods are deleting it.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>:.: Louis Raphael's Portfolio :.:</title>
<link rel="stylesheet" media="screen" href="./style.css" type="text/css" />
<meta name="description" content="Online web portfolio for Louis Raphael" />
<meta name="keywords" content="web, portfolio, louis raphael web, louis raphael web designer, louis raphael porfolio, louis raphael web producer, design" />
<script src="./jquery.js" type="text/javascript" charset="utf-8">
</script>
<script src="./js.js" type="text/javascript" charset="utf-8">
</script>
<style type="text/css">
img, div { behavior: url(iepngfix.htc) }
</style>

<style type="text/css">
/*<![CDATA[*/
span.c1 {font: 10px arial; color: #CCC}
/*]]>*/

</style>

DrDoc

7:39 am on May 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is on line 24 in
js.js
?

raphlo2

1:31 pm on May 13, 2009 (gmt 0)

10+ Year Member



$(document).ready(function() {

$("a.portfolioBtn1").css('backgroundColor', '#OOOOOO');
$("a.portfolioBtn").css('backgroundColor', '#FFFFFF');

$("a.portfolioBtn1").click(function() {
$("#portfoliostrip").animate({left: "0px"});
$(".itemDescription").toggle();
$(".itemDescription").slideDown();
$(".buttons a").css('backgroundColor', '#FFFFFF');
$("a.portfolioBtn").css('backgroundColor', '#cfcfcf');
$(this).css('backgroundColor', '#cfcfcf');
});
$("a.portfolioBtn2").click(function() {
$("#portfoliostrip").animate({left: "-730px"});
$(".itemDescription").toggle();
$(".itemDescription").slideDown();
$(".buttons a").css('backgroundColor', '#FFFFFF');
$("a.portfolioBtn").css('backgroundColor', '#cfcfcf');
$(this).css('backgroundColor', '#cfcfcf');
});
$("a.portfolioBtn3").click(function() {
$("#portfoliostrip").animate({left: "-1460px"});
$(".itemDescription").toggle();
$(".itemDescription").slideDown();
$(".buttons a").css('backgroundColor', '#FFFFFF');
$("a.portfolioBtn").css('backgroundColor', '#cfcfcf');
$(this).css('backgroundColor', '#cfcfcf');
});

whoisgregg

1:58 pm on May 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't use jQuery too much, but I know in other situations the method of specifying CSS properties can be temperamental. Instead of
'backgroundColor'
I would try
'background-color'
and that might clear up the whole problem. :)

Added: Also, you might want to wrap the

left
property in your animate function with quotes:
$("#portfoliostrip").animate({ 'left': "-1460px"});

raphlo2

5:59 pm on May 13, 2009 (gmt 0)

10+ Year Member



Unfortunately that didn't work :(

DrDoc

7:33 pm on May 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A couple comments ...

This line:

$("a.portfolioBtn1").css('backgroundColor', '#OOOOOO');

Should be:
$("a.portfolioBtn1").css('backgroundColor', '#000000');

You need another

});
at the very end of the script.

Otherwise I think it will work as-is.

raphlo2

7:58 pm on May 13, 2009 (gmt 0)

10+ Year Member



It works. No wonder they call you Dr! You cured my site! Thank you so much!