SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast Albablue89's Avatar
    Join Date
    Jul 2005
    Location
    Scotland
    Posts
    98
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Rotating Text in Container onLoad

    Hi,

    I'm looking for some sort of script that will rotate and randomise text in a container.

    Here below, I have a Testimonial Panel on the right hand side of my main page, and I'm looking to display a random Testimonial within it.

    Code:
    <div class="randomtestimonialpanel">
              <h3><strong>Testimonials:</strong></h3>
              <p align="justify">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the.....</p>
              <h4 align="right">-John Smith, Webdesigner</h4>
    </div>
    Obviously, It's the following content that I want to rotate together (the testimonial itself and the name.)

    Code:
    <p align="justify">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the.....</p>
    <h4 align="right">-John Smith, Webdesigner</h4>
    I'm not quite sure how to do this, I have all the styles set for the panel, <p> and <h4>.

    I'm just unsure on the actual client-side of things.

    Any ideas / help?

    Thanks!

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Albablue89 View Post
    I'm looking for some sort of script that will rotate and randomise text in a container.
    There are many possible interpretations that can be applied to that. Do you have an example of what you want to achieve?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Enthusiast Albablue89's Avatar
    Join Date
    Jul 2005
    Location
    Scotland
    Posts
    98
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Here is an example of the panel's design.

    http://cssdesk.com/ewvBq

    Now, what I am looking for is <p> and <h4> to rotate together.

  4. #4
    SitePoint Enthusiast Albablue89's Avatar
    Join Date
    Jul 2005
    Location
    Scotland
    Posts
    98
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    No ideas?

  5. #5
    SitePoint Addict
    Join Date
    Apr 2011
    Posts
    265
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    Check this page:
    http://www.coursesweb.net/javascript...image-jquery_t
    it is a tutorial about how to rotate Div, Images, and other HTML elements with jQuery, by any angle. The Div (or other html element) is rotated with all its content.
    Works also in IE 7+.
    Free: Web Programming Courses HTML, CSS, Flash
    Web Programming: AJAX Course and PHP-MySQL Course video Lessons
    Good JavaScript and jQuery course for beginners


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •