Pages

Saturday, October 29, 2011

Find content in element using jquery


Have you ever get a problem on append some text in an element while you don't want to append it if that element already has contained it using jquery??. If so the following is algorithm to solve that :
  1. find element that contains text
  2. check whether that element length more than 0 or not
  3. if yes then append text
  4. if not just leave it
Here is the code :

No comments:

Post a Comment

Don't Forget To Join Our Community
×
Widget