Insert a character using jquery at some location using substring

April 8, 2010 at 1:18 pm 1 comment

Snippet

var count=$(‘.content’).length;
var before=$(‘.content’).text().substring(0,125);
var after=$(‘.content’).text().substring(125,count);
var result=before+’…’+after;

About these ads

Entry filed under: Javascript, jquery. Tags: .

z-index issue with IE7 Jquery | Some useful and qucik scripts

1 Comment Add your own

  • 1. Kaan  |  July 11, 2013 at 8:44 am

    If you could write down the output too would be great.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Flickr Photos

Someone is coming ( #Portugal #Lisboa #rioTejo )

low winter sun | vagnsstaĆ°ir, iceland

Rahma

More Photos

Blog Stats

  • 656,370 hits

Follow

Get every new post delivered to your Inbox.

Join 38 other followers

%d bloggers like this: