KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
i have this and a simple question to it. $.ajax({ type: "POST", url: "/", data: $(".form").serialize(), dataType: "html", success: function (data) { $("#id").html(data); } }); Inside "data" is some html I am inserting into the DOM. Thats no problem. But I want to manipulate the "data" before doing so. How can I do that? For example there are some li elements in "data". How would I for example delete the last li element out of the "data" string before inserting it into the DOM? I tried something like $(data li:last)remove(); ...but that didnt work. Thanks for your help.
Tags (comma-separated)
Save Edits
Cancel