JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://2012.bigfishdev.com/_assets/css/global.css">
<script src="http://2012.bigfishdev.com/_assets/js/script.js"></script>
<section class="focus title-left">
<div class="wrap">
<div id="isofocus">
<div class="focusbox core strategy creative technology title"><h1>areas<br /><span>of</span><br />focus</h1></div>
<div class="focusbox core intro">
No matter what your project or campaign requires, the Bigfish band of experts is fully capable of delivering edge-ovative results.
</div>
<div class="focusbox core strategy">
<p><a class="popup" href="#focus" rel="#brand-strategy">brand strategy</a></p>
<div id="brand-strategy" class="popup-box expanded-content">
<div class="inner wrap">
<div class="focus-title">brand strategy</div>
<div class="focus-content">
The Bigfish brand strategy team has more than 15 years of experience analyzing and orchestrating extraordinary growth in brand value for renowned global organizations. It is our belief that strong brands are the result of the collective decisions an organization makes in pursuit of its growth strategy. A well-executed brand strategy:
<br /><br />
<ul>
<li>Presents a consistent visual and verbal message across touchpoints</li>
<li>Is implemented by all team members not just marketers</li>
<li>Cuts through the clutter of commoditized sameness</li>
<li>Simplifies complexities</li>
<li>Focuses less on rational offerings and more on stakeholder benefits</li>
<li>Taps into emotional drivers</li>
<li>Builds trust and reduces risk</li>
<li>Decreases the sales cycle</li>
<li>Adds significant monetary value</li>
</ul>
<br />
Brands that authentically communicate with their target audiences build intangible value in...
JavaScript
$(document).ready(function() {
function defineFocusRowLength() {
var rowFocusBoxCount = 0;
$('#isofocus .focusbox.core').each(function(){
rowFocusBoxCount++;
if($(this).css('float') === 'right') {
finalFocusRowBoxCount = rowFocusBoxCount;
return false;
}
});
$('#isofocus .slidecontent').remove();
$('#isofocus .focusbox.core:nth-child('+finalFocusRowBoxCount+'n)').after('<div class="slidecontent"><div class="wrap"></div></div>');
if($('#isofocus .focusbox.core').last().css('float') === 'right') {
// do nothing because it should have been caught by the previous line
} else {
$('#isofocus .focusbox.core').last().next('.focusbox').each(function(){
if($(this).css('float') === 'right') {
if($(this).next('.focusbox').css('float') === 'right') {
$(this).next('.focusbox').after('<div class="slidecontent"><div class="wrap"></div></div>');
} else {
$(this).after('<div class="slidecontent"><div class="wrap"></div></div>');
}
}
});
}
}
defineFocusRowLength();
$(window).resize(function() {
defineFocusRowLength();
});
$(".focusbox a.popup").click(function(){
var expandtext = $(this).parents('.focusbox').children('.expanded-content').html();
$(this).parents('.focusbox').next('.slidecontent').html(expandtext);
$(this).parents('.focusbox').next('.slidecontent').slideToggle();
})
});