I am having difficulties trying to figure out how this weird jQuery syntax works. Everything works except for when you get to the button click. I’m not sure how the {% %} stuff is supposed to work around a function like that. I am currently getting this console message: SyntaxError: Unexpected token )
My code:
// Check for new upload...if true refresh page
{% if (file.new_up ) { %}
{%=file.new_up=false%}
{%=$("#no_ups").html("Your upload was successfully completed. <button>x</button>") %}
{%=$("#no_ups").show("slow") %}
{%=$("button").click(function ( ) { %}
{%=$("#no_ups").hide("slow") %}
{% }) %}
{% } %}
I did this instead of trying to mess with that server side code