[web2py] Re: Any jquery gurus out there?
That is true. I have also run into that problem. At first, I thought it might be that too so I changed it and it still didn't work right. When I noticed I was sure that was it (or rather was hoping that was it.) I did also do a search and it seems that problem is not very-well documented either. Strange since almost everything I've ever run into someone else has seen it all before. On Thursday, July 12, 2012 12:57:46 PM UTC-5, Derek wrote: > > You know, with IE, I have had problems if my "script" tags didn't have > "type='text/javascript". > > On Tuesday, July 10, 2012 3:54:14 PM UTC-7, 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. >> >> https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js >> "> >> >> $(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(); >> }); >> }); >> >> >> 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 >> > --
[web2py] Re: Any jquery gurus out there?
You know, with IE, I have had problems if my "script" tags didn't have "type='text/javascript". On Tuesday, July 10, 2012 3:54:14 PM UTC-7, 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. > > https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js > "> > > $(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(); > }); > }); > > > 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 >
[web2py] Re: Any jquery gurus out there?
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. > > https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js > "> > > $(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(); > }); > }); > > > 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 >
[web2py] Re: Any jquery gurus out there?
Have you checked the Javascript console? http://blogs.msdn.com/b/cbowen/archive/2011/06/24/internet-explorer-9-developer-tools-deep-dive-part-3-debugging-javascript.aspx