Hot File

Displaying new messages with jQuery News Ticker

View: 1260    Dowload: 0   Comment: 0   Post by: hanhga  
Author: none   Category: References   Fields: Other

9 point/6 review File has been tested

When on the news page, you often see a lot of sites displaying their latest newsletter in a certain line on the home page, and we often saw when viewers first sight with the effects display different text.

Introduction

When on the news page, you often see a lot of sites displaying their latest newsletter in a certain line on the home page, and we often saw when viewers first sight with the effects display different text.

Today I will share with you the easiest way to do this application for your website, just use jQuery News Ticker plugin, it is lightweight and easy to set up for use.

Step 1: HTML

Suppose we need to show this news release are as follows:

1
2
3
4
5
6
<ul id="js-news" class="js-hidden">
    <li class="news-item"><a href="#">This is the 1st latest news item.</a></li>
    <li class="news-item"><a href="#">This is the 2nd latest news item.</a></li>
    <li class="news-item"><a href="#">This is the 3rd latest news item.</a></li>
    <li class="news-item"><a href="#">This is the 4th latest news item.</a></li>
</ul>

Step 2: Insert jQuery

First you download the jQuery plugin on in the download section, then decompressed, the file is copied 2 jquery.ticker.js and ticker-style.css, then put in your web folder. Next is inserted immediately following the declaration on the <head>

1
2
3
<link href="styles/ticker-style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script src="includes/jquery.ticker.js" type="text/javascript"></script>

After the insertion is complete, to display new messages, you insert the following script immediately below:

1
2
3
4
5
<script type="text/javascript">
    $(function () {
        $('#js-news').ticker();
    });
</script>

Just as that is done, and you can check the results show its newsletter. However, if you want to change the parameters for matching, you can refer to the following:

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
$(function () {
    $('#js-news').ticker({
        speed: 0.10,           // Tốc độ chạy hiệu ứng
        ajaxFeed: false,       // Hiển thị thông qua feed
        feedUrl: false,        // đường dẫn URL feed
        feedType: 'xml',       // Currently only XML
        htmlFeed: true,        // Hiển thị jQuery News Ticker qua HTML
        debugMode: true,       // HIển thị lỗi
        controls: true,        // Hiển thị điều khiển
        titleText: 'Latest',   // Nếu bạn muốn thay đổi tiêu đề thì thay ở đây
        displayType: 'reveal', // Kiểu hiệu ứng 'reveal' hoặc 'fade'
        direction: 'ltr',       // Dòng chữ xuất hiện từ bên nào. có 2 lựa chọn là 'ltr' hoặc 'rtl'
        pauseOnItems: 2000,    // thời gian dừng
        fadeInSpeed: 600,      // tốc độ cho hiệu ứng face
        fadeOutSpeed: 300      //  tốc độ cho hiệu ứng face
    });
});

The code above is the default report when we make statements $ ('# js-news'). Ticker (); Suppose you want to Fade effect appear instead Reveal and change the title displayed, then you do the following:

01
02
03
04
05
06
07
08
09
10
11
<script type="text/javascript">
    $(function () {
        $('#js-news').ticker({
            speed: 0.10,
            htmlFeed: false,
            fadeInSpeed: 600,
        displayType: 'fade',
            titleText: 'Tin Mới'
        });
    });
</script>

Very simple and easy to implement is not it. Good luck!

Displaying new messages with jQuery News Ticker

Displaying new messages with jQuery News Ticker Posted on 14-08-2015  When on the news page, you often see a lot of sites displaying their latest newsletter in a certain line on the home page, and we often saw when viewers first sight with the effects display different text. 1.5/10 1260

Comment:

To comment you must be logged in members.

Files with category

  • Instructions for installing and configuring Windows Live Mail on Windows 10 simple

    View: 2286    Download: 0   Comment: 0   Author: none  

    Instructions for installing and configuring Windows Live Mail on Windows 10 simple

    Category: References
    Fields: Other

    0/2 review
    Windows 10 pre-installed Mail application for managing personal email on the device. The latest version of this application but improved a lot and support other email accounts such as Gmail or Yahoo Mail but users almost no "salty" really with this...

  • Step by step instructions to create social networking buttons with CSS3

    View: 1772    Download: 0   Comment: 0   Author: none  

    Step by step instructions to create social networking buttons with CSS3

    Category: References
    Fields: Other

    0.75/6 review
    CSS3 help web designers have the ability to create buttons (buttons) very nice, today I will share with you two tips decoration for button in your web becomes radiant beauty that no need to use photoshop.

  • You should understand the CSS Box Shadow

    View: 1945    Download: 0   Comment: 0   Author: none  

    You should understand the CSS Box Shadow

    Category: References
    Fields: Other

    1.3181818181818/11 review
    Effects his shadow was introduced in the previous article, however, in this article, I will guide more specific about shadow attributes, you try it with anything. First we try to learn css following paragraph:

  • How to do button movement with beautiful CSS3

    View: 1627    Download: 0   Comment: 0   Author: none  

    How to do button movement with beautiful CSS3

    Category: References
    Fields: Other

    0/3 review
    Previously to create motion effects button, you must draw the button in photoshop, then switched to flash to make it possible to move. But now you need not spend too much time doing it, all because of the emergence of CSS3.

  • Create a dropdown menu with CSS3 effects with beautiful transtions

    View: 1908    Download: 0   Comment: 0   Author: none  

    Create a dropdown menu with CSS3 effects with beautiful transtions

    Category: References
    Fields: Other

    0.45/10 review
    More of the dropdown menu you want to introduce to you, this will have the effect menu transitions (converted background of menu background from pale to dark). This menu works well on browsers like FF, Chrome, Safary, but unfortunately did not work...

  • How to hack css for all browsers you should know

    View: 1545    Download: 0   Comment: 0   Author: none  

    How to hack css for all browsers you should know

    Category: References
    Fields: Other

    1.6875/8 review
    In the process of web design, which makes it the most headaches is how to design web pages that you can run on the browser. Especially when clients use the old as IE6 browser such. However, with this article, you will easily edit interface runs well...

  • Create Accordion with extremely beautiful CSS3

    View: 1917    Download: 0   Comment: 0   Author: none  

    Create Accordion with extremely beautiful CSS3

    Category: References
    Fields: Other

    0.9/5 review
    Accordion is a technique that helps you shortened the content that you want displayed on the website. It is often used for the display of submenus. In addition you can also use it for content, images. Before applying this procedure, you have to use...

  • Create the effect Hovercho images with Webkit and CSS3 is great

    View: 1638    Download: 0   Comment: 0   Author: none  

    Create the effect Hovercho images with Webkit and CSS3 is great

    Category: References
    Fields: Other

    1.125/4 review
    WebKit is one open source application framework provides the necessary components built one for your web browser. Along with CSS3, cả have contributed to very nice effect những previously only using JavaScript or JQuery thực beige.​

 
Newsletter Email

File suggestion for you

File top downloads

logo codetitle
Codetitle.com - library source code to share, download the file to the community
Copyright © 2015. All rights reserved. codetitle.com Develope by Vinagon .Ltd