I want to my div ids to correspond to items in a database. Based on an id my app will pull appropriate content from a database.
Hence when I use .click() to handle a click I need to pass the Id of the div being clicked to the function that handles it. How do I do this?
Inside your
clickevent handler function, the context (thethiskeyword) refers to the DOM element that triggered the event, you can get the id from it, for example: