Link to home
Start Free TrialLog in
Avatar of seopti
seopti

asked on

jquery slideToggle question

When someone clicks on the text "Click here to view phone number" the phone number appears below the text and it pushes content down. What I would like to do is the phone number should appear where the text is so the text will be hidden once the link was clicked (phone number replaces text).

				<div id="showphone">Click here to view phone number</div>
<div class="phone" style="display: none;"><span itemprop="telephone"><?php echo $attorneysStuff['bizPhone'];?></span></div>

<script>
   $(document).ready(function() {
        $('#showphone').click(function() {
                $('.phone').slideToggle("slow");
        });
    });

	</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial