Extract words from text - Javascript jQuery

Javascript examples for jQuery:Text

Description

Extract words from text

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-git.js"></script> 
  <script type="text/javascript">
    $(window).on('load', function() {
$('*[data-fx]').each(function() {
     var el = $(this),//from w ww.  j  a  v  a 2 s  .co m
         fx = el.data('fx'),
         tokens = (fx || '').split(' ')
     el.text(tokens);
})
    });

      </script> 
 </head> 
 <body> 
  <div data-fx="fadeInDown in 2s after 1.5s"></div>  
 </body>
</html>

Related Tutorials