Page A contains this in the body:
Page B contains:
I can use this script to identify if they contain an overlay class with this:
var htmlString = $('body').html().toString();
var index = htmlString.indexOf("div class=\"overlay-");
if (index != -1)
For the return value, instead of "It works", how do I get it to pull in the rest of the class name e.g. "overlay-results" or if needs be the whole div content e.g. "<div class="overlay-results"><span></span></div>"?
There are many other pages like this with different 'overlay-' class names so don't want to do one for each hence this 'one size fits all' approach.
Below is an example of the HTML where I'd like to record the clicks of BUTTON 1, BUTTON 2, or BUTTON 3 if the h2 value is 'THIS IS THE H2 TEXT':
<h2>THIS IS THE H2 TEXT</h2>
<a href="/link1/">BUTTON 1</a>
<a href="/link2/">BUTTON 2</a>
<a href="/link3/">BUTTON 3</a>
Thanks in advance.
I've heard conflicting reasons both for and against. Would be great to get a more conclusive answer.
Still haven’t A/B tested font-size on your website? You could score 32% ...
WhoAcceptsAmex.com performed an A/B test on their website which compared different font-sizes of the text. They tested 6 different sizes for
OfficeToolTips Word Tip: How to use different page orientations inside o...
Sometimes page orientation for a particular page has to be different to the rest of the document. E.g., big tables or pictures look better i
MCF - '0' Time Lag Conversion Segment changes conversion quantity of '0'...
MCF - '0' Time Lag Conversion Segment changes conversion quantity of '0', gravy834, 5/8/13 2:07 PM, Hi, I've tried applying the following co
Google Analytics Privacy Concern: Random Sites appearing as popups
Just over a week after Google made an announcement to increase privacy for users, which has mainly angered a lot of the SEO community, they
Learn to code: make your own Bitly interface in two minutes
In this blog post, you will learn to code your own bitly user interface in just two minutes. (caveat: this depends on how fast you can copy/
Hen Weekends – Award Winning Hen Nights, Hen Do & UK Hen Parties
Award Winning hen weekends & nights by World Famous Redseven. Classy hen fun guaranteed - hotels, dancing, pamper, entertainment, ABTA &
How to Widgetize a Page, Post, Header or Any Other Template in WordPress
Have you ever found a plugin for a widget that you'd like to use in a page or post, but the only widgetized sections of your theme are sideb
Excel An IF statements that operates if a cell CONTAINS a word...
Excel tips and Excel help from the MrExcel Message Board regarding An IF statements that operates if a cell CONTAINS a word...
High Bounce Rates? – Now Google Offers to Block Your Site | SEO Unique Blog
I noticed something new in Google (or at least I've never seen it before) - next to the Cached link on a domain there's seems to be a link d
Stag Weekends, Stag Do, Hen Nights - Redseven Stag & Hen Parties
Save yourself time and money - Great Hen and Stag Weekend deals guaranteed for UK and Abroad Hotels, Activities, Clubs, Flights, Pamper plus