I'm new to jQuery and trying to work out how to achieve the following...
I have two div shown below, I want group
div to show on load but not single
div then onclick of group
or single
I need toggle between the two. How can this be done. This is what I have so far.
Send to: <a href="">Group</a> | <a href=""> Single<</a>
<div id="group">I'm a group</div>
<div id="single">I'm a single object</div>
UPDATE:
So something like this seems to work for me....
$("#link").click(function(e) {
e.preventDefault();
$("#divA, #divB").toggle();
$(this).text(function(i, text) { return (text == "Show viewA") ? "Show viewB" : "Show viewA" });
});
but divB does not show.