Inline Title Editor

Size
3,584 Kb
Views
4,048

How do I make an inline title editor?

What is a inline title editor? How do you make a inline title editor? This script and codes were developed by Jimmy Van Der Sleen on 15 January 2023, Sunday.

Inline Title Editor Previews

Inline Title Editor - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Inline Title Editor</title> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="siteTitle"> Inline title editor
</div>
<h1> <a href="#">Product / </a> <span class="title"> 123456 </span> <form> <input type="text" class="inputTitle"> <button class="saveBtn"><i class="fa fa-check"></i></button> <button class="tochnietBtn"><i class="fa fa-times"></i></button> </form>
</h1> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Inline Title Editor - Script Codes CSS Codes

@import url(https://fonts.googleapis.com/css?family=Open+Sans);
* { margin: 0; padding: 0;
}
body { background-color: #1b84ad; font-family: 'Open Sans', sans-serif;
}
.siteTitle { text-align: center; color: #fff; font-size: 1.8em; margin-top: 50px;
}
h1 { margin: 25px auto 0; color: #223b40; font-size: 1.5em; z-index: 100; background-color: #fff; position: relative; padding: 14px; width: 600px; box-shadow: 2px 2px 10px #666;
}
h1 a { text-decoration: none; color: #223b40; float: left; margin-top: 4px;
}
h1 a:hover { color: #336699;
}
h1 .title { position: relative; width: auto; margin-left: 5px; border: 1px solid #FFF;
}
h1 .title:hover { border: 1px solid #ccc;
}
h1 .title:hover i { opacity: 1; display: inline-block;
}
h1 .title i { opacity: 0; padding: 2px; display: inline-block; margin-left: 5px;
}
#overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); z-index: 5;
}
form { position: absolute; top: 4px; left: 118px; width: 400px; border: 1px solid #fff; background-color: #fff;
}
form input { margin-top: 2px; float: left; padding: 5px; width: 60%; margin-left: 5px; margin-right: 10px; border: 1px solid #fff; font-size: 1em;
}
form button { height: 43px; width: 43px; float: left; background-color: #fff; border: 1px solid #ccc;
}
form button:last-child { border-left: none;
}
#wrapper { width: 100%; float: left; margin: 100px auto;
}
#wrapper .click { width: 100px; height: 50px; background-color: red; margin-bottom: 10px; color: #FFF; text-align: center;
}
#wrapper .hover:hover { background-color: blue;
}

Inline Title Editor - Script Codes JS Codes

$(document).ready(function(){ var title = $('.title'); var icon = $('<i class="fa fa-pencil icon"></i>'); var $overlay = $('<div id="overlay"></div>'); var inputField = $('.inputTitle') var form = $('form'); title.append(icon); $('body').append($overlay);	$overlay.hide(); $('form').hide(); // open the input field var openInput = function(){ var spanValue = $('.title').text(); inputField.val(spanValue); $overlay.show(); // title.hide(); icon.hide(); form.show(); inputField.focus(); }; // Close the input field var closeInput = function(){ event.preventDefault(); $overlay.hide(); var spanValue = $('.inputTitle').val(); form.hide(); title.text(spanValue); title.show(); title.append(icon); icon.show(); }; $('span').on('click', function(event) { openInput(); }); $overlay.on('click', function (event) { closeInput(); }); $('.saveBtn').on('click', function(e){ e.preventDefault(); closeInput(); console.log('Naam is opgeslagen') }); $('.tochnietBtn').on('click', function(e){ e.preventDefault(); closeInput(); console.log('Naam is niet veranderd') });	});// ennd document ready
Inline Title Editor - Script Codes
Inline Title Editor - Script Codes
Home Page Home
Developer Jimmy Van Der Sleen
Username sjimster
Uploaded January 15, 2023
Rating 3
Size 3,584 Kb
Views 4,048
Do you need developer help for Inline Title Editor?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Jimmy Van Der Sleen (sjimster) Script Codes
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!