Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JQuery & Javascript: I need to make a simple blog html page that will let me add and delete a post containing name, comment, and

JQuery & Javascript: I need to make a simple blog html page that will let me add and delete a post containing name, comment, and date the comment was made using the js moment library found in [ https://momentjs.com/downloads/moment.js ]. This is what I have so far.. I'm having a bit of trouble with the subtree. Comments would be appreciated, thanks! //******************************** post.html ******************************//

JavaScript Comment Board

class="container">

class="pb-2 mt-4 mb-2 border-bottom">

My Fake Blog

class="row col-md-8 col-md-offset-2">

Post About Thing

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

This is a wall of text. This is a wall of text. This is a wall of text.

class="card w-100">

class="card-header">Add a comment

class="card-body">

class="form-group">

class="form-control" placeholder="Name"/>

class="form-group">

class="form-group">

class="card w-100 mt-3">

class="card-header">

class="row">

class="col-md-11">

etomai

class="col-md-1">

class="card-body">

This is my comment. I think the post is too long.

//******************************** comment.js ******************************//

$("#comment_submit_button").click(function()

{

comment_name = $("#comment_name").val();

comment_text = $("#comment_text").val();

comment_date = moment().format("l");

if(!/^[a-zA-Z0-9]+/.test(comment_name))

{

comment_name = "Error_User-Violation"

}

if(!comment_text.trim())

{

comment_text = "Error_Text_Violation"

}

comment_template = $("#test").clone();

comment_template.find("#comment_board-userName").text(comment_name).append( " " + comment_date);

comment_template.find("#comment_board-userText").text(comment_text);

comment_template.insertBefore("#test");

return false //equals like system("pause") in c++

})

$(document).on('click', '.delete_btn' , function()

{

console.log("hu")

$(this).find("#test").remove();

console.log("nothing happen")

})

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

How is yield determined for a process manufacturer?

Answered: 1 week ago

Question

3. Comment on how diversity and equality should be managed.

Answered: 1 week ago

Question

describe the legislation that addresses workplace equality

Answered: 1 week ago