javascript - Delete record animation isn't working with dialog-confirm -


OK, what I have is an Ajax delete record. I jquery dialog-confirmation instead of using javascript confirmation Have tried to add. The deletion function works, but the problem is that the removal line animation was not working.

What I have now here

Any help would be appreciated ($ line = $ result-> fetch_assoc ()) {echo & lt; Tr class = "

Php

  record" & gt; '; Echo '& lt; TD & gt; $ I ++ ' & Lt ;. / Td> & Lt; Td align = "center" & gt; & Lt; A href = "#" name = "'. $ Line [" counter "].', '$ Row [idas]].'" Class = "delbuttons" & Gt; & Lt; Img src = "images / del.png" range = "0" width = "10" height = "10" title = "delete" & gt; & Lt; / A & gt; & Lt; / Td> & Lt; TR & gt;  

Jquery / Ajax

$ (". Delbuttons"). Click (function () {//e.preventDefault (); var element = $ (this); var del_id = element.attr ("name"); var info = 'prdelete =' + del_id; $ ("# dialog ".") Dialog ({button: {"Confirm": Function () {$ .ajax ({type: "GET", url: "delete.php", data: info, success: function () {}}) ; {$ (This) .parents ("record") ({BackgroundColor: "# fbc7c7"}, "sharp"). ({Fuzzy: "hide"}, "slow", function () {setTimeout (function () { Window.location.reload ();} ("off"); $ (this). DLOG ("closed");}, "cancel": function () {$ (this) .dialog ("closed"); }}} $ ("# Dialog") dialog ("open");});

You're a J. You must add "//code.jquery.com/ui as" "/1.11.0/jquery-ui.js". See the demo below.

  & lt; html & gt ; & Lt; top & gt; & lt; script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" & gt; & lt; / script & Gt; & lt; script src = "// code.jquery.com/ui/1.11.0/jquery-ui.js"></script> & Lt; Script & gt; $ (Document) .ready (function () {$ ("#effect") .animate ({backgroundColor: "# aa0000", color: "#fff", width: 500}, 5000);}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "effect" style = "border: 1 px solid red; height: 100px; width: 100px; condition: full;" & Gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -