Fade after Slide still Sliding
Hello all,
Here's the situation:
I'll slideUp a div, load some ajax, then slideDown the result.
In the result, there are two more divs (navigation and 'subcontent' containers)
I have links in the navigation div that should fadeIn new content (via ajax) into the subcontent container.
Now, the fadeIn fadeOut functions operate correctly _until_ I use a slide on the larger div. If I slide at all, everything turns into a slide, even within the subcontainers. I'm not sure what's going on.
Here's an example structure for the divs:
- <div id="globalnav">Anchors/Links for the maincontent div</div>
- <div id="maincontent">"maincontent" should slide open and closed.
- <div id="nav">Anchors/Links in here</div>
- <div id="subcontent">This content should fadeIn and fadeOut</div>
- </div>
And here's some of the jquery I'm using:
- function subContent(el, data) {
- // the el variable comes from the anchor tag
- $('#subcontent')
- .ajaxStart(function() {
- $(this).fadeOut();
- })
- .load(el.attr('href'),data)
- .ajaxStop(function() {
- $(this).fadeIn();
- });
- }
- function mainContent(el, data) {
- // the el variable comes from the anchor tag
- $('#itemTabs')
- .ajaxStart(function() {
- $(this).slideUp();
- })
- .load(el.attr('href'),data)
- .ajaxStop(function() {
- $(this).slideDown();
- });
- }
To reiterate, fades work properly until a slide occurs, after that, the maincontent div slides on every anchor. I feel like I'm missing something simple. Any ideas?
Thanks!
-Trevor