I’m pretty sure this is just a semantics problems but I would be very grateful if someone could lead me in the right direction.
The HTML:
<div class="grid_7">
<div class="big">
The elusive
</div>
</div>
The function:
$(function(){
$(' .grid_7 > .big').bigtext();});
I’m trying to grab .grid_7’s child .big
Here’s a link to the real code:
http://designobvio.us/dov2/index.html
I know the script works cuz when i do
$(function(){
$(' .grid_7:first-child').bigtext();});
everything fine… therefore, it’s semantics? or am I crazy?
Thank you so much
Read the documentation on the
bigtextplugin website:Your
.bigelement doesn’t have any childdivelements, so nothing happens.The reason your
:first-childattempt works is that:first-childreturns the first.grid_7element, not the first of its children.You need to apply the
bigtextmethod to.grid_7, or you need to add anotherdivaround.big.