jQuery selector for matching at start AND end of ID?

jquery

Solution

$('[id ^=aName][id $=EditMode]')

Problem

I have a group of buttons on my web page which all have an id that end with the text "EditMode". I'm using jQuery to assign an event to like so ``` $('[id $=EditMode]').click(editHandler); ``` However now I want to prefix the id with a name (which I will know in advance) so the id would be "aName+someotherstuff+EditMode". How do I alter the above expression so I match on aName AS WELL as editMode?

Original source