I am using the photo tagging script found here
http://www.bryantan.info/jquery/5 Very simple code.
It works great, but is always in tag enabled mode. How can I implement a button “Tag photo”, which when clicked will enable tagging, and otherwise, the tagging is disabled. Also, When done tagging, this button can be clicked to turn off tagging.
Like facebook tagging.
You need a
varthat will toggle aBooleanvalue initially set tofalse.Return your image clicks if that value is
false🙂here is how to do it:
jsBin demo (with basic button functionality)
than add a button somewhere like:
than add into this an
ifstatement:Now you just need to toggle your
tagEditingvar, button text and image cursor style:and also on upload :
Additionally if var
tagEditing == falseyou’d like to change the image cursor style fromcrosshairtodefault(look in the demo to see how)