Not a jquery guru...
What would happen if you changed the anchor tags to spans? If it works it
will also allow you to remove the "event.preventDefault()" call.
Also I would change this line of code:
$("a.reveal").click(function (event) {
to this:
$(".reveal").live('click', function(event){
The "live" method allows for repeated clicks on the identifier. In the
past, click methods are exhausted after they have fired one time. I don't
think this is caused by a peculiarity in my own code, though it is possible.
Anyway, good luck.
On Tuesday, July 10, 2012 6:54:14 PM UTC-4, RKS wrote:
>
> I know this is probably not the right place to ask, but I am using w2p and
> post here pretty frequently so I figured what the heck. I'm also in a rush
> and not finding out what I need on stackoverflow.
>
> I have some jquery and it works in every browser except any version of IE.
> If you happen to notice anything right off the bat that will cause this not
> to work, please let me know. I'm desperate. Thanks.
>
> <script src="
> https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
> "></script>
> <script>
> $(function () {
> // hide all the steps on document load
> $("div.step").addClass("hidden");
> // show the one step that is identified by the current hash
> (if any)
> $(document.location.hash).removeClass("hidden");
> $("a.reveal").click(function (event) {
> var idToReveal = $(this).attr("href");
> // store the ID to show in the URL for bookmarking
> document.location.hash = idToReveal;
> // hide every step that is currently visible
> $("div.step").not(".hidden").addClass("hidden");
> // reveal the next div (as identified by the current
> link's href)
> $(idToReveal).removeClass("hidden");
> // prevent the default click behavior (i.e. prevent
> navigation)
> event.preventDefault();
> });
> });
> </script>
>
> Quick recap, this hides divs and shows them via anchors on the page. It
> also saves the hash so on reload it opens to the current hash instead of
> going back to 1. Thanks
>