Tuesday, October 20, 2009

[jQuery] Re: Am i missing something? tis not working in IE

Thank-you.

It was the trailing comma after "500"

Simple but nasty to find! LOL

Thanx
Jess

On Oct 20, 11:12 pm, MorningZ <morni...@gmail.com> wrote:
> Can you be more specific than dumping a bunch of lines of code and
> saying "doesn't work"... like can you pin down a general location of
> where it might be failing?
>
> one thing that stands out is the use of "enter" as a function name,
> and IE and reserved words like that don't play nice, try "Enter" or
> something that has no chance to conflict.....  again, that's just a
> wild guess though
>
> On Oct 20, 5:40 am, jessie <mi...@optusnet.com.au> wrote:
>
>
>
> > Hi
>
> > Everything is working as it should in Firefox, i've checked the
> > firebug and its not spitting out any errors.
>
> > Except,,,, in IE its not working...
>
> > Can someone please have a look at my code and tell me if i'm missing
> > somethin gplease.
>
> > Thank-you in advance.
>
> > Jess.
>
> > Here is the scripts.. in order.
> > <script type="text/javascript" src="http://ajax.googleapis.com/ajax/
> > libs/jquery/1.3.2/jquery.min.js"></script>
> > <script type="text/javascript" src="skins/{VAL_SKIN}/jquery.easing.
> > 1.3.js"></script>
> > <script type="text/javascript" src="skins/{VAL_SKIN}/
> > jquery.fancybox-1.2.1.pack.js"></script>
> > <script type="text/javascript" src="skins/{VAL_SKIN}/effects.js"></
> > script>
>
> > Here is all my code
>
> > jQuery(function($) {
>
> > function getLeaf(url) {
> > var splited=url.split('?');// remove all the parameter from url
> > url=splited[0];
> > url=splited[0];
> > return url.substring(url.lastIndexOf("/")+1);// return file name}
>
> > jQuery.fn.extend({
> >  enter: function() {//plugins creation
> >      return this.each(function() {
> >        var pth = $(this).find("img")[0];
> >       //alert($(this).children().attr("href"));
> >        if($(this).children().attr("href")==getLeaf
> > (document.location.href)){// check that the link url and document url
>
> >            $(pth).attr("src",pth.src.replace(/.gif/g, '_active.gif'));
> >        } else{
> >                $(this).hover(function(){
> >                   $(pth).attr("src",pth.src.replace(/.gif/
> > g,'_active.gif'));// mouse over Image
> >                   },function(){
> >                       $(pth).attr("src",pth.src.replace(/_active.gif/
> > g,'.gif'));
> >                       });
> >                }
> >                });
> >      }});
>
> > $(function(){  // Document is ready
> >  $(".LPButton,.CatMoreBtn").enter();// call the function});
>
> >         $('input[type="image"]').hover(
> >                 function () { $(this).attr("src", $(this).attr("src").split('-
> > off').join('-on')); },
> >                 function () { $(this).attr("src", $(this).attr("src").split('-
> > on').join('-off')); }
> >         );});
>
> > $(function(){  // Document is ready
> > $("a.group").fancybox({
> >                 'overlayShow'                   : true,
> >                 'zoomSpeedIn'                   : 600,
> >                 'zoomSpeedOut'                  : 500,
> >         });
> >         });
>
> > It works fine if i delete this part
>
> > $(function(){  // Document is ready
> > $("a.group").fancybox({
> >                 'overlayShow'                   : true,
> >                 'zoomSpeedIn'                   : 600,
> >                 'zoomSpeedOut'                  : 500,
> >         });
> >         });
>
> > So i must be missing something here.
>
> > Thanks- Hide quoted text -
>
> - Show quoted text -

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate