Skip to content

JS Syntax, and fix selector. #1794

@jbeales

Description

@jbeales

There's a place that I think we're trying to use jQuery to select something with the class wpsc-visitor-meta, but the dot is missing. Also, a trailing comma has been removed, (my IDE is yelling at me).

Also, JSHint is telling me about a bunch of more stylistic or performance issues in wp-e-commerce.js, such as duplicate variable declarations, duplicate jQuery selectors, (making jQuery do the selection twice instead of doing it once and storing the result in a variable), and unneeded variable assignments, like this:

var message = format.replace("%s",label);
return message;

I'm willing to do a cleanup here, is that something that we would like done, or are there reasons, (like clarity), that to ignore the JSHint warnings?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions