Skip to main content
added 40 characters in body
Source Link
Shyju
  • 219.6k
  • 106
  • 420
  • 498
var $this = $(this);
hrefLink = 'http://example.com';
text = $this.text();

var blockQ=$('<blockquote class="quote">
                           <a href="'+hrefLink+'">'+text+'</blockquote>');
blockQ.prependTo( $this.closest('p'));

Demo : http://jsfiddle.net/QGtYQ/5/

var $this = $(this);
hrefLink = 'http://example.com';
text = $this.text();

var blockQ=$('<blockquote class="quote">
                           <a href="'+hrefLink+'">'+text+'</blockquote>');
blockQ.prependTo( $this.closest('p'));
var $this = $(this);
hrefLink = 'http://example.com';
text = $this.text();

var blockQ=$('<blockquote class="quote">
                           <a href="'+hrefLink+'">'+text+'</blockquote>');
blockQ.prependTo( $this.closest('p'));

Demo : http://jsfiddle.net/QGtYQ/5/

Source Link
Shyju
  • 219.6k
  • 106
  • 420
  • 498

var $this = $(this);
hrefLink = 'http://example.com';
text = $this.text();

var blockQ=$('<blockquote class="quote">
                           <a href="'+hrefLink+'">'+text+'</blockquote>');
blockQ.prependTo( $this.closest('p'));