views:

68

answers:

1

Rephrasing a previous question, been worknig on it a while and have fixed a few issues, but remaining is that some menus don't expand or close when clicked in IE and Webkit browsers. Everything works perfectly fine in FF. And the Chrome Developer tools and IE's tools don't show any errors in the scripts.

The FILTER MENY is meant to close on click(it is expanded on default) and the other menus are meant to expand on click. All but NYHETSBREV work.

I am losing hair over this, please can someone take a look and tell me what I'm doing wrong?

The site in questions is linked here for you.

jsFiddle examples:

Expand/close

Close/Expand

Thanks!!

FIX: IE's tools (of all things) told me there was an extra ; at the end of the offending scripts. I removed it and now everything works fine..

A: 

I fixed this by hitting F12 in IE, using it's script testing tool and it showed me that there was an extra ; at the end of two of my scripts.

var $jinf = jQuery.noConflict();


$jinf(function() {
    $jinf("#clicker").click(function() {
        $jinf(".show-hide").slideDown("slow");
    }, function() {        
        if(!$jinf(this).data('pinned'))
            $jinf(".show-hide").slideUp("slow");
    });
    $jinf("#clicker").click(function() {
        var pin = $jinf(this).data('pinned');
        $jinf(this).data('pinned', !pin);
        if(pin) $jinf(".show-hide").slideUp("slow");      
    });
});​ <-- this semicolon here. 

I removed it and now all works perfectly as it should.

Kyle Sevenoaks
Hmm, according to JSLint that semicolon should be there (and shouldn't cause any problems, anyway). I suspect the cause of your problem is on a different place.
Marcel Korpel
As I expected, it's meant to be there.. Y'know, I've had problems like this before. When browsers are registering a character as something else, but only using this computer in this country. I think I need a new keyboard or something. Thanks for the link!
Kyle Sevenoaks