Wrap last word in span
How do I make an wrap last word in span?
What is a wrap last word in span? How do you make a wrap last word in span? This script and codes were developed by Petri Pottonen on 26 November 2022, Saturday.
Wrap last word in span - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>wrap last word in span</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<button>moi</button> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Wrap last word in span - Script Codes CSS Codes
span { color: #f00;
}
Wrap last word in span - Script Codes JS Codes
jQuery(document).ready(function($){ $( "body" ).append( '<div class="image-caption" id="yui_3_17_2_2_1443517385572_2007"><p id="yui_3_17_2_2_1443517385572_2006">© Matti Tuominen #globalfashblogs</p></div>' );
});
$( "button" ).click(function() { $('.image-caption p').html(function(){ // separate the text by spaces var text= $(this).text().split(' '); // drop the last word and store it in a variable var last = text.pop(); // join the text back and if it has more than 1 word add the span tag // to the last word return text.join(" ") + (text.length > 0 ? ' <span class="last">'+last+'</span>' : last); });
});
![Wrap last word in span - Script Codes](http://shots.codepen.io/ketri/pen/ZbLzzy-512.jpg)
Developer | Petri Pottonen |
Username | ketri |
Uploaded | November 26, 2022 |
Rating | 3 |
Size | 2,072 Kb |
Views | 14,168 |
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!
Name | Size |
Squarespace translate five next and previous | 1,653 Kb |
Slidein portfolio without ajax | 4,965 Kb |
Delay animation loop scss | 2,423 Kb |
Animated text background-image | 819,265 Kb |
Responsive typography example | 2,295 Kb |
A Pen by Petri Pottonen | 33,168 Kb |
Infinite scrolling background | 2,281 Kb |
Outrun test 1 | 4,677 Kb |
JM navi offcanvas | 4,916 Kb |
Mouseover image | 1,403 Kb |
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!
Name | Username | Size |
Pure CSS albums gallery | Renaudtertrais | 2,978 Kb |
Velocity.js custom stagger | Tommiehansen | 4,805 Kb |
Funny menu | AxeLVaisper | 4,671 Kb |
FreeCodeCamp - Simon Game | Ivhed | 8,481 Kb |
Spinners using Font Icons | Keyamoon | 3,007 Kb |
A Pen by Huan Nghiem | Nightshade | 10,646 Kb |
Promodoro | Bencarp | 1,712 Kb |
Rows with image hover effect | Amit-webdesigner | 12,875 Kb |
Blog Concept - Single Post | Marionebl | 9,603 Kb |
A Pen by Kevin | Kevinkenger | 2,642 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!