So I tried creating the slide up down effect like in this example
http://paulsturgess.co.uk/articles/show/83-jquery-text-slide-up-slide-down-effect
The problem is..its showing the text when the web page opens
I want the "Paragraph" to be displayed ONLY when mouse is over it and NOT when the page first loads
I am a complete noob to Jquery but I want to make it work
Help?
My script
<script type="text/javascript">
$(function(){
$('.feature_box').showFeatureText();
})
$.fn.showFeatureText = function() {
return this.each(function(){
var box = $(this);
var text = $('p',this);
// text.css({ position: 'absolute', top: '57px' }).hide();
box.hover(function(){
text.slideDown("slow");
},function(){
text.slideUp("fast");
});
});
}
HTML content
<div>
<div class="feature_box" align="right">
<h2><a href="#">Cart Details</a></h2>
<p>
<a href="#">Excepteur sint occaecat cupidatat non proident. <BR />
Qui officia deserunt mollit anim id est laborum<br />
Excepteur sint occaecat cupidatat non proident. <BR />
Qui officia deserunt mollit anim id est laborum</a></p>
</div>
</div>
What changes do I make so that paragraph doesn't appear by default when the page first loads??
Also, Is the mouse over effect on the div tag or the p tag ? I am a bit confused sorry I am really new to all this..plz help?
[EDIT]
I just made some changes and it didn't display Pragraph when the page first loaded
The following line was commented out
// text.css({ position: 'absolute', top: '57px' }).hide();
Again is the mouse over effect on DIV tag or P tag ??
[EDIT 2]
Is the following line of code containing some function of JQuery or what ?
text.css({ position: 'absolute', top: '57px' }).hide();
What is the "text.css" ???