Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#btn1").click(
- function () {
- if ($("#titleBlockWrapper > div > .content").css("display") === "block") {
- $("#titleBlockWrapper > div > .content").css("display", "none");
- $("#titleBlockWrapper > div > form").css("display", "block");
- }
- else {
- $("#titleBlockWrapper > div > .content").css("display", "block");
- $("#titleBlockWrapper > div > form").css("display", "none");
- jQuery.ajax({
- url: "update.php",
- type: "POST",
- dataType: "html",
- data: jQuery("#titleBlockWrapper > div > form").serialize(),
- success:
- function(response) {
- var result = jQuery.parseJSON(response);
- $("#titleBlockWrapper .content").html(result.pageContent);
- },
- error:
- function(response) {}
- });
- }
- return false;
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement