4 Replies - 370 Views - Last Post: 26 January 2012 - 02:30 PM

Topic Sponsor:

#1 TechnoBear  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 129
  • Joined: 02-November 11

Possible marquee setup question.

Posted 26 January 2012 - 01:31 PM

The is a, what I am assuming is a marquee with a pause element Here at the top of the page in the html is a div element with id of live-now.

I have spent some time trying to work out how the have managed it making use of firebug and google, I'm figuring it's a CSS build of some description as it doesn't call javascript and the page is basic html, not php. I just can't for the life of me work out how they have done it.

I am trying to emulate this marquee element and really need help on how to get it done.

Thank you in advance.

Is This A Good Question/Topic? 0
  • +

Replies To: Possible marquee setup question.

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1758
  • View blog
  • Posts: 2,693
  • Joined: 08-June 10

Re: Possible marquee setup question.

Posted 26 January 2012 - 02:08 PM

If you look just below where the div is defined in the markup, you will find this:
<script type="text/javascript">
(function($){
    $(document).ready(function(){
        $('#live-now').show();
        
        $('#live-now .wrapper').vTicker({
           speed: 500,
           pause: 6000,
           showItems: 3,
           animation: 'fade',
           mousePause: true,
           height: 0,
           direction: 'up'
        });
        
    });
})(jQuery);
</script>


Which makes use of the jQuery vticker plugin to do the marquee-like animation.

The marquee element itself is not to be used anymore. It's non-standard and has already been marked, in the HTML5 standard, as an obsolete feature. If you really need that type of behavior, rely on CSS or Javascript instead.
Was This Post Helpful? 1
  • +
  • -

#3 TechnoBear  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 129
  • Joined: 02-November 11

Re: Possible marquee setup question.

Posted 26 January 2012 - 02:15 PM

Thank you for the quick and solid reply. I have never done anything with JQuery. Is there anything extra i need to do for jqueries to work or is it similar to javascript setups?
Was This Post Helpful? 0
  • +
  • -

#4 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1758
  • View blog
  • Posts: 2,693
  • Joined: 08-June 10

Re: Possible marquee setup question.

Posted 26 January 2012 - 02:30 PM

jQuery is just a Javascript library. It provides a number of handy tools to simplify the development of Javascript code. All you need to do to use it is include the jQuery Javascript file into your pages. - Google (and others) provide hosting services for jQuery scripts that anybody can use, or you can just download it of the jQuery site and host it yourself.

A simple example:
<!DOCTYPE html>
<html>
	<head>
		<title>jQuery Example</title>
		<meta charset="UTF-8"/>
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
		<script>
		$(function() {
			$("#main_text").html("This site can now use jQuery!");
		})
		</script>
	</head>
	<body>
		<p id="main_text"></p>
	</body>
</html>



jQuery plugins, like vticker, just add functionality to the jQuery library. They usually come in their own Javascript files that you just load in <script> tags after you load jQuery.
Was This Post Helpful? 1
  • +
  • -

#5 TechnoBear  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 129
  • Joined: 02-November 11

Re: Possible marquee setup question.

Posted 26 January 2012 - 02:30 PM

think i may have worked it out thank you so much for helping
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1