Question

I am using this jquery function that works fine in win/mac FF 3.5 and Safari,

But not in IE 8, The text changes on each condition in it, but the hidden div, with css set to display none doesn't work.

//Expander Function
function expando(showText, hideText, content, selector) {
        var showText= showText;
        var hideText= hideText;
        $(selector).click(function() {
        $(this).html ($(this).html()== hideText ? showText : hideText);
                $(content).toggle();
                return false;});}
expando('… Read More',' Show Less','span.more-description','a.more-desc');
expando('Click Here To View','Hide Details','ul.more-options','span.solo a');

IN IE 8 I get this error Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 3.0.30618; Media Center PC 5.0; SLCC1) Timestamp: Mon, 26 Oct 2009 14:12:32 UTC

Message: Invalid argument. Line: 12 Char: 12949 Code: 0 URI: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js

Was it helpful?

Solution

JQuery is currently on 1.4.2; can you try with 1.4.2 and see if the issue is still present?

OTHER TIPS

There is a problem with your Jquery version. Mine too, i will try to update.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top