skip to Main Content

Jquery – How to write Textlimit Function with keeping the structure of the HTML

jQuery(function($) { $(document).ready(function() { var moreLink = 'Read more'; var lessLink = 'Read less'; // Save the original content $('.container').each(function() { var originalContent = $(this).html(); $(this).data('original-content', originalContent); }); $('.container p').each(function() { var container = $(this).parent(); var wordLimit = parseInt(container.closest(".container").attr('data-word-limit')); var…

VIEW QUESTION

How to get array input data using jquery?

My input field is as below: <input type="hidden" name="data[{{ $parentIndex }}][{{ $index }}]" value="{{ $value }}"> My sample data: <input type="hidden" name="data[0][0]" value="Name"> <input type="hidden" name="data[0][1]" value="contact_email"> <input type="hidden" name="data[0][2]" value="phone number"> <input type="hidden" name="data[0][3]" value="contact_location"> <input type="hidden" name="data[0][4]" value="">…

VIEW QUESTION
Back To Top
Search