Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Cannot pass any jquery into Nivo slider
Old 08-26-2010, 03:52 AM Cannot pass any jquery into Nivo slider
Novice Talker

Posts: 10
Trades: 0
Hey guys
I am using this nice jquery slider for a website and have come to a roadblock in that I cannot pass any kind of jquery to alter this thing. I am mainly trying to use cufon font replacement to make a nicer looking caption / headline on it. I have also tried using other jquery functions like .append and .wrap and nothing does anything. I will post my code below:

oh and the website is http://brainbuzzmedia.com/themes/amplify/html/

HTML Code:
<!-- cufon -->
<script src="js/cufon-yui.js" type="text/javascript"></script>
<script src="cufon/Museo_Sans_500.font.js" type="text/javascript"></script>
<script src="cufon/mplus-2p_400.font.js" type="text/javascript"></script>
<script type="text/javascript">
            Cufon.replace('h1, h2, h3, h4, h5, h6, th', { fontFamily: 'mplus-2p' });
            Cufon.replace('.cufon', { fontFamily: 'mplus-2p' });
</script>

<!-- sliders -->
<script src="js/jquery.nivo.slider.pack.js" type="text/javascript"></script>

<!-- initialize sliders -->
<script type="text/javascript">
$(window).load(function() {
    $('#slider').nivoSlider({
        controlNav:true,
        directionNav:false,
        animSpeed:500,
        pauseTime:4000
    });
});
</script>

<!-- add headers to slider captions for cufon -->
<script type="text/javascript">
$(document).ready(function(){
    $('.box_third ps').wrap('<h4 />');
}); 
</script>

</head>

...

<!-- nivo slider -->
            <div id="slider">
            <a href="http://www.webmaster-talk.com/images/slide1.jpg"><img src="http://www.webmaster-talk.com/images/slide1.jpg" alt="" title="<h4>This is the title of the article.</h4>" /></a>
            <a href="http://www.webmaster-talk.com/images/slide2.jpg"><img src="http://www.webmaster-talk.com/images/slide2.jpg" alt="" /></a>
            <a href="http://www.webmaster-talk.com/images/slide4.jpg"><img src="http://www.webmaster-talk.com/images/slide3.jpg" alt="" /></a>
            <a href="http://www.webmaster-talk.com/images/slide5.jpg"><img src="http://www.webmaster-talk.com/images/slide4.jpg" alt="" /></a>
            <a href="http://www.webmaster-talk.com/images/slide6.jpg"><img src="http://www.webmaster-talk.com/images/slide5.jpg" alt="" /></a>
            </div>
As you can see on the live page, hard coding the <h4> into the title"" tag (what Nivo uses for the caption) only displays an <h4> with the default font and won't use any jquery.

Last edited by chrishirst; 08-28-2010 at 08:00 PM..
brainbuzzmedia is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-02-2010, 12:17 PM Re: Cannot pass any jquery into Nivo slider
Junior Talker

Posts: 2
Trades: 0
Hello,

I've the same problem. Did you find a solution?
DennisMadsen is offline
Reply With Quote
View Public Profile
 
Old 09-04-2010, 02:52 PM Re: Cannot pass any jquery into Nivo slider
Novice Talker

Posts: 2
Trades: 0
$(window).load(function() {
$('#slider').nivoSlider({
controlNav:true,
directionNav:false,
animSpeed:500,
pauseTime:4000
});
});


replace by

$(document).ready(function() {
$('#slider').nivoSlider({
controlNav:true,
directionNav:false,
animSpeed:500,
pauseTime:4000
});
});
__________________

Please login or register to view this content. Registration is FREE
asskate is offline
Reply With Quote
View Public Profile
 
Old 09-04-2010, 03:48 PM Re: Cannot pass any jquery into Nivo slider
Junior Talker

Posts: 2
Trades: 0
I've done that, but it does not work. I've created this example:
http://uploads.dennismadsen.com/nivo-slider/

As you see, only the first caption has been affected by the cufon.

How can I fix that?
DennisMadsen is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Cannot pass any jquery into Nivo slider
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13481 seconds with 12 queries