<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Nonny123</title>
    <description>The latest articles on Forem by Nonny123 (@nonny123).</description>
    <link>https://forem.com/nonny123</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F89457%2Fd84a1fba-9ebe-4ee8-aad1-746dcd0b8f42.jpeg</url>
      <title>Forem: Nonny123</title>
      <link>https://forem.com/nonny123</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nonny123"/>
    <language>en</language>
    <item>
      <title>Word count using jQuery</title>
      <dc:creator>Nonny123</dc:creator>
      <pubDate>Mon, 06 Aug 2018 01:51:45 +0000</pubDate>
      <link>https://forem.com/nonny123/word-count-using-jquery-2edg</link>
      <guid>https://forem.com/nonny123/word-count-using-jquery-2edg</guid>
      <description>

&lt;p&gt;This post is aimed at creating a jQuery word count function. The code below can be used to limit the total number of words in a textbox (e.g Abstract for research thesis report) using jQuery.&lt;/p&gt;


&lt;div class="runkit-element"&gt;
  &lt;code&gt;&lt;/code&gt;
  &lt;code&gt;
function WordCount() {
       //Get Text data
        var inp = document.getElementById('txtabstract').value;
    var regex = /\s+/gi;

    var wordcount = jQuery.trim(inp).replace(regex, ' ').split(' ').length;      


    $("#labelcount").html(wordcount);
}

$(document).ready(function(){
    //count word on page load
    WordCount();
//count word on entering text in TextBox
$("#txtabstract").on('input',function(){
    WordCount();


})  

})
&lt;/code&gt;
&lt;/div&gt;


&lt;p&gt;This code is used to let a user know when the abstract for his project report has exceeded 300 words (which is the standard for an abstract) at &lt;a href="http://www.classgist.com/projectcategory.aspx?catid=1"&gt;Classgist&lt;/a&gt;&lt;/p&gt;


</description>
      <category>jquery</category>
      <category>javascript</category>
      <category>wordscount</category>
    </item>
  </channel>
</rss>
