Last active
July 22, 2018 16:50
-
-
Save suresh-kumara-gist/ecc55ba23f232bc87a3186dcc7563bfe to your computer and use it in GitHub Desktop.
get 2nd p element after h2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.cloudways.com/blog/best-startup-books-for-new-entrepreneurs/ | |
var bookstitle; jQuery("h2").each(function(index) { | |
bookstitle += " @BooksBag " + $(this).text() + " by " + $( this).next("p").next("p").clone() //clone the element | |
.children() //select all the children | |
.remove() //remove all the children | |
.end().text(); console.log(bookstitle); | |
}); | |
@BooksBag Zero to One by Peter Thiel with Blake Masters @BooksBag The Innovator’s Dilemma by Clayton M. Christensen @BooksBag Founders at Work by Jessica Livingston @BooksBag Crossing the Chasm by Geoffrey A. Moore and @BooksBag Screw it, Let’s do it by Richard Branson @BooksBag Start Something That Matters by Joan Salge Blake @BooksBag Never Too Late to Startup by Rob Kornblum @BooksBag Creativity, Inc.: Overcoming the Unseen Forces That Stand in the Way of True Inspiration by Ed Catmull @BooksBag Good to Great by James C. Collins @BooksBag Start with Why by Simon Sinek @BooksBag SuperBosses by Sydney Finkelstein @BooksBag The Lean Startup by Eric Ries @BooksBag Hooked by Nir Eyal @BooksBag The E-Myth Revisited by Category: Product Strategy @BooksBag The $100 Startup by Chris Guillebeau @BooksBag The Power of Broke by Daymond John and Daniel Paisner @BooksBag How to Transform Your Ideas into Software Products by Poornima Vijayashanker @BooksBag The Startup Owner’s Manual by Steve Blank @BooksBag Running Lean by Ash Maurya @BooksBag The Checklist Manifesto: How to Get Things Right by Atul Gawande @BooksBag The Four Steps to the Epiphany by Steve Blank @BooksBag Traction by Gabriel Weinberg and Justin Mares @BooksBag The 7 Day Startup by Dan Norris @BooksBag The Third Wave by Steve Case @BooksBag The Art of the Start by Guy Kawasaki @BooksBag The Hard Thing About Hard Things by Ben Horowitz @BooksBag Will it Fly? by Thomas K. McKnight @BooksBag Venture Deals by Brad Feld @BooksBag Mastering the VC Game by Jeffrey Bussgang @BooksBag The Power of Habit by Charles Duhigg | |
var bookstitle = []; jQuery("h2").each(function(index) { | |
bookstitle.push(" @BooksBag " + $(this).text() + " by " + $( this).next("p").next("p").clone() //clone the element | |
.children() //select all the children | |
.remove() //remove all the children | |
.end().text()); | |
}); console.log(bookstitle); | |
0 | |
: | |
" @BooksBag Zero to One by Peter Thiel with Blake Masters" | |
1 | |
: | |
" @BooksBag The Innovator’s Dilemma by Clayton M. Christensen" | |
2 | |
: | |
" @BooksBag Founders at Work by Jessica Livingston" | |
3 | |
: | |
" @BooksBag Crossing the Chasm by Geoffrey A. Moore and" | |
4 | |
: | |
" @BooksBag Screw it, Let’s do it by Richard Branson" | |
5 | |
: | |
" @BooksBag Start Something That Matters by Joan Salge Blake" | |
6 | |
: | |
" @BooksBag Never Too Late to Startup by Rob Kornblum" | |
7 | |
: | |
" @BooksBag Creativity, Inc.: Overcoming the Unseen Forces That Stand in the Way of True Inspiration by Ed Catmull" | |
8 | |
: | |
" @BooksBag Good to Great by James C. Collins" | |
9 | |
: | |
" @BooksBag Start with Why by Simon Sinek" | |
10 | |
: | |
" @BooksBag SuperBosses by Sydney Finkelstein" | |
11 | |
: | |
" @BooksBag The Lean Startup by Eric Ries" | |
12 | |
: | |
" @BooksBag Hooked by Nir Eyal" | |
13 | |
: | |
" @BooksBag The E-Myth Revisited by Category: Product Strategy" | |
14 | |
: | |
" @BooksBag The $100 Startup by Chris Guillebeau" | |
15 | |
: | |
" @BooksBag The Power of Broke by Daymond John and Daniel Paisner" | |
16 | |
: | |
" @BooksBag How to Transform Your Ideas into Software Products by Poornima Vijayashanker" | |
17 | |
: | |
" @BooksBag The Startup Owner’s Manual by Steve Blank" | |
18 | |
: | |
" @BooksBag Running Lean by Ash Maurya" | |
19 | |
: | |
" @BooksBag The Checklist Manifesto: How to Get Things Right by Atul Gawande" | |
20 | |
: | |
" @BooksBag The Four Steps to the Epiphany by Steve Blank" | |
21 | |
: | |
" @BooksBag Traction by Gabriel Weinberg and Justin Mares" | |
22 | |
: | |
" @BooksBag The 7 Day Startup by Dan Norris" | |
23 | |
: | |
" @BooksBag The Third Wave by Steve Case" | |
24 | |
: | |
" @BooksBag The Art of the Start by Guy Kawasaki" | |
25 | |
: | |
" @BooksBag The Hard Thing About Hard Things by Ben Horowitz" | |
26 | |
: | |
" @BooksBag Will it Fly? by Thomas K. McKnight" | |
27 | |
: | |
" @BooksBag Venture Deals by Brad Feld" | |
28 | |
: | |
" @BooksBag Mastering the VC Game by Jeffrey Bussgang" | |
29 | |
: | |
" @BooksBag The Power of Habit by Charles Duhigg" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment