Tuesday, January 1, 2013

Django jQuery AJAX Self Replacing Script

Hi,
I am not entirely sure of what you intend but I will suggest you refactor your javascript/jQuery code into 3 named functions, 1 for the original script, the other for the replacement script and the third function should just choose which of the first two functions to use depending on the ID of the clicked button. Then you will only ever need to replace the html. But I don't know the requirements of your op so I can't say for sure if this is the right way to go about it. There it is, my 2 kobo (cents if you are not a Nigerian). Happy new year all!
--abraham

--------------------------
Sent from my mobile device

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment