[jQuery] Re: Creating callbacks using Cycle plugin

2009-02-18 Thread HM-User

Oh that's great Mike thanks for helping me! I think with the script
loading, I've streamlined it and so now I've linked everything which
can either be linked js files or external CSS files. So hopefully that
will do the trick. It seems to have work with things I have done just
now.

Can you explain to me about the last comma? As I am don't have a wide
knowledge of jQuery. Thanks.

On Feb 18, 11:52 pm, Mike Alsup  wrote:
> > Currently, I have implemented a small image gallery using the jQuery
> > Cycle plugin. It's working perfectly but I would also like to add
> > callbacks. How do I successfully do this? I currently have:
>
> > jQuery(document).ready(function(){
> >         jQuery('#frame1').cycle({
> >         fx:'fade',
> >         speed:'500',
> >         timeout: 0,
> >         next:'#next2',
> >         prev:'#prev2',
> >         });
> >         });
>
> Watch out for that last comma (after '#prev2', that's a script killer
> in IE).
>
> > What I would like to happen is as a user scrolls to the next image
> > (which fades in) the image and its corresponding caption appears
> > (basic styled text below it). The same action also when a user clicks
> > previous for the last image.
>
> The 'before' and 'after' callbacks will help you here.  Check out this
> demo:
>
> http://www.malsup.com/jquery/cycle/after.html
>
> > Also, I have general concerns about script loading. I have quite of
> > number of linked js files in my header. Seemingly, when you select and
> > view a webpage for the first time, the above script doesn't work -
> > only when you hit refresh does the image gallery appear properly. Is
> > this a problem at all?
>
> Hard to say without seeing it in action.  Can you post a link?


[jQuery] Re: Creating callbacks using Cycle plugin

2009-02-18 Thread HM-User

After looking at the example, I'm afraid I don't know how to work out
what I need to define for the functionality that I need, as I've
looked at the Intermediate Section also. If I have this:

alt =""
title="" />
Prev Next

and I assign each image's alt and/or title, how can I evoke them as
captions below each image after clicking prev/next?



On Feb 19, 12:00 am, HM-User  wrote:
> Oh that's great Mike thanks for helping me! I think with the script
> loading, I've streamlined it and so now I've linked everything which
> can either be linked js files or external CSS files. So hopefully that
> will do the trick. It seems to have work with things I have done just
> now.
>
> Can you explain to me about the last comma? As I am don't have a wide
> knowledge of jQuery. Thanks.
>
> On Feb 18, 11:52 pm, Mike Alsup  wrote:
>
> > > Currently, I have implemented a small image gallery using the jQuery
> > > Cycle plugin. It's working perfectly but I would also like to add
> > > callbacks. How do I successfully do this? I currently have:
>
> > > jQuery(document).ready(function(){
> > >         jQuery('#frame1').cycle({
> > >         fx:'fade',
> > >         speed:'500',
> > >         timeout: 0,
> > >         next:'#next2',
> > >         prev:'#prev2',
> > >         });
> > >         });
>
> > Watch out for that last comma (after '#prev2', that's a script killer
> > in IE).
>
> > > What I would like to happen is as a user scrolls to the next image
> > > (which fades in) the image and its corresponding caption appears
> > > (basic styled text below it). The same action also when a user clicks
> > > previous for the last image.
>
> > The 'before' and 'after' callbacks will help you here.  Check out this
> > demo:
>
> >http://www.malsup.com/jquery/cycle/after.html
>
> > > Also, I have general concerns about script loading. I have quite of
> > > number of linked js files in my header. Seemingly, when you select and
> > > view a webpage for the first time, the above script doesn't work -
> > > only when you hit refresh does the image gallery appear properly. Is
> > > this a problem at all?
>
> > Hard to say without seeing it in action.  Can you post a link?


[jQuery] Re: Creating callbacks using Cycle plugin

2009-02-18 Thread HM-User

Thanks so much! It worked. I'm sure if someone else needs this, they
will sure be happy to find your answer.

On Feb 19, 5:10 am, Mike Alsup  wrote:
> > alt =""
> > title="" />
> > Prev Next
>
> > and I assign each image's alt and/or title, how can I evoke them as
> > captions below each image after clicking prev/next?
>
> Hmm, should be pretty easy for that setup.  Assuming you have a
> #caption element somewhere:
>
> $('#frame1').cycle({
>         prev: '#prev',
>         next: '#next',
>         before: function() {
>                 $('#caption').html(this.alt);
>         }
>
> });


[jQuery] Adding additional callbacks to image slides

2009-03-01 Thread HM-User

I have a number of image slides which are fading in and out and I am
also using the pager option (jQuery Cycle). What I want to know
however is, is it possible to invoke a created headline for the image
as well as the image's alt?

So:
function onAfter() {
jQuery('#caption').html(this.alt);
}

displays the current slide's alt. What if I also wanted to display a
special title for each slide along with the above alt? Would you
somehow have to create an array for the title headings?

For example:
Image 1:  with title: STORY 1
Image 2:  with title: STORY 2









[jQuery] Integration of jQuery with website

2009-03-03 Thread HM-User

I wanted to ask something in general. There seems to be a very slight
issue with my website that is running the jQuery and plugin scripts.
It seems that sometimes if you visit the website or click 'Home' to go
back to the main page or view other sections, the browser loads the
site very quickly and it muddles up how the website looks. It's like
hanging divs on top of existing divs. It's not major and by using the
browser to refresh the page, everything looks fine.

Is there some sort of issue with this?


[jQuery] How to add a links to callback display

2009-03-04 Thread HM-User

I am looking at the jQuery Cycle Demo of the Callbacks example. Before
and after each slide appears, a caption or small text can show below
the slide. However, how can I make some or all the text be a  tag so people can click on the callback text to go to a story?


[jQuery] Re: How to add a links to callback display

2009-03-04 Thread HM-User

jQuery(document).ready(function() {
jQuery('.feature').cycle ({
fx: 'fade',
speed: 'slow',
timeout: 7000,
before: onBefore,
pager: '#featurenav'
});
function onBefore() {
jQuery('#headline').html(this.alt);
}
});

#headline is my caption area with each slide assigned with an 
tag to display the html text.

On Mar 4, 11:50 pm, HM-User  wrote:
> I am looking at the jQuery Cycle Demo of the Callbacks example. Before
> and after each slide appears, a caption or small text can show below
> the slide. However, how can I make some or all the text be a  a> tag so people can click on the callback text to go to a story?


[jQuery] RE: Anchors & Images Tutorial

2009-03-05 Thread HM-User

I have had a look at this tutorial by Malsup and simply, you can add
an a link to the image slides.
However, for me like the tutorial with:

function onAfter() {
$('#output').html("Current anchor: " + this.href);

I have for myself:

before: onBefore,
pager: '#featurenav'
});
function onBefore() {
jQuery('#headline').html(this.alt);
}
});

The image slides are held within a div and it is simply: .

But adding the a link to the img src tag does not make the alt text
appear but the image does link. How can I get the a link to the image
AND the alt text to appear as well?