views:

42

answers:

2

I don't understand what I'm doing wrong here... line 3 is reporting missing : after property ID

$(document).ready(function() {

    $('#imagegallery img').each(function({$(this).css({ width: '100%'});});

    $('#imagegallery').cycle({
        timeout: 0,
        fx: 'scrollHorz',
        width: '100%',
        height: 'auto',
        next: '.next',
        prev: '.prev' 
    });



    $("#imagegallery").touchwipe({
        wipeLeft: function() {
            $("#imagegallery").cycle("next");
        },
        wipeRight: function() {
            $("#imagegallery").cycle("prev");
        }
    });
});
+3  A: 

Problem is with this line:

$('#imagegallery img').each(function({$(this).css({ width: '100%'});});

should be:

    // missing ) --------------------v
$('#imagegallery img').each(function(){$(this).css({ width: '100%'});});

Although you can shorten it like this:

$('#imagegallery img').css({ width: '100%'});
patrick dw
I'd say it should be: `$('#imagegallery img').css({ width: '100%'});` ;)
Nick Craver
@Nick - Agreed. Just finished updating. :o)
patrick dw
@patrick - +1 - good eyes
Nick Craver
A: 

You're missing a close paren in

// $('#imagegallery img').each(function({$(this).css({ width: '100%'});}); 
// should be:
$('#imagegallery img').each(function(){$(this).css({ width: '100%'});});

Could that be it?

Christopher W. Allen-Poole