Using Toggle with jQuery / ajax -
what i'm trying toggle. onclick event set in html. external div loaded onclick opens (appended). when click link again it's appended again. wrong. want close. open , close. keeping onclick event in html. how????
here's code...
(function($){ $.am_get_item = function (item_id, size_id){ $.ajax({ url: "/order/item/" + item_id + "/" + size_id, success: function(data){ $(".item_form").hide(); $(data).find("#show_item").appendto("#form_" + item_id); $("#form_" + item_id).slidedown("slow"); $("input#form1").keyup(function () {var value = $(this).val();$("div#ok").text(value);}).keyup(); }}); } })(jquery);
Comments
Post a Comment