Help with jQuery accordion .show .hide Javascript guys please just take 5 minutes and read!
2 replies, posted
Alright guys I need help, Im desparate
[url]http://jqueryui.com/demos/accordion/#custom-icons[/url]
That accordion menu has icons with the jQuery UI framework
This accordion (job im doing for someone)
[url]http://www.fadetoblackproductions.com/shootingfaq.html[/url]
I don't want to have to install the whole damn UI framework just for this shit.
Id like to use the accordion that I have now.
[url]http://www.fadetoblackproductions.com/files/jquery.js[/url]
This is the current javascript file that im using.
[url]http://www.fadetoblackproductions.com/style/format.css[/url]
And the class that appends to it.
Not experienced with jQuery/javascript at all but im hoping I can use either a unicode arrow or a small arrow.gif or .png
something along the lines of....
when the accordion is active it shows the content and the arrow is pointing down
and when the accordion is not it points up or to the left
here is an example of what I mean
[url]http://www.cb2.com/Stores/[/url]
I'm hoping on just adding a few lines of javascript and something in the CSS maybe.
Also thinking maybe changing the class when in an active state and using the arrow icon as a background image
then switch classes back and forth with jQuery?
Also please be productive don't be an ass and say just install the framework or USE THIS HURR
I think ive explained what I need and want well enough.
Thank you to all who contribute
[code]
$(document).ready(function(){
$("div.accordionButton").click(function(){
var checker = $(this).next();
checker.stop(false, true);
if (!checker.is(':visible'))
checker.css('background-image', 'url(/images/arrow_left.png)');
checker.slideDown('normal');
return false;
}
if (checker.is(':visible'))
{
checker.css('background-image', '/url(images/arrow_down.png)')
checker.slideUp('normal')
return false;
}
});
});
[/code]
Just from the top of my head. I'm not sure if this will work or not, but I'll try to get it right haha.
[QUOTE=CantUseSpace;31154747][code]
Just from the top of my head. I'm not sure if this will work or not, but I'll try to get it right haha.[/QUOTE]
Ill give it a shot in an hour or so (on mobile)
and post results, Thank you so much =D
Sorry, you need to Log In to post a reply to this thread.