19 February 2010 ~ 0 Comments

Use jQuery to select child element

Suppose you have the following structure:

<div class="section">
<h3 class="title">Title</h3>
<span class="description">…</span>
</div>
<div class="section">
<h3 class="title">Title</h3>
<span class="description">…</span>
</div>

This code will let you access the child elements of ‘.section’ when you use an ‘each’ function

<script type="text/javascript">
$(function(){
$(‘.section’).each(function(i,element){
$(‘description’,this).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100);
});
});
</script>

I hope this helps someone, I kept forgetting how to do this, so this is mostly a reminder for myself.
Source: http://stackoverflow.com/questions/306583/jquery-this-selector-and-children/306904#306904

Continue Reading

06 October 2009 ~ 0 Comments

How to fix z-index problem in ie7 with jQuery?

A quick post, I was just having problems in my website with my beautiful picture showing on top of everything. It was showing fine in FF but in Internet Explorer 7 it was showing behind, so you could only see like half of my face and that’s not fare for anyone.
I found this cool website [...]

Continue Reading

Tags: , , , , ,