I’m trying to get it so that when a user clicks Delete Record for each individual, and hits the confirm prompt it actually deletes the individual record from local storage. It appears my clear local storage one works, but not the delete individual one.
Share
I think you overcomplicated event handlers, why use
$(document).delegate('#clearSData', 'click',instead of just#clearData'.click()?Also, whatis this.key ? I think
thisisthisof the button, it not related to storage.All works fine in my sample:
http://jsfiddle.net/oceog/7Lawq/3/
HTML:
JS:
CSS:
So, add
data('key',key)to button and use that data inside your dialog button click closure.