Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6882209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:13:31+00:00 2026-05-27T05:13:31+00:00

I tried making several jQuery content slider and carousel scripts, working with iframe, without

  • 0

I tried making several jQuery content slider and carousel scripts, working with iframe, without success.

The iframe contains Google charts and are generated by a Ruby plugin ( google_visualr )… you can see what HTML is generated :

  <div class='carousel_charts'>
    <ul>
      <li id='bar_chart'>

        <script type='text/javascript'>
          google.load('visualization','1', {packages: ['corechart'], callback: function() {
            var data_table = new google.visualization.DataTable();data_table.addColumn('date', 'Date');data_table.addColumn('number', 'Refinery');data_table.addColumn('number', 'Locomotive');data_table.addColumn('number', 'Comf. Mexican Sofa');data_table.addColumn('number', 'Nesta');data_table.addRow([{v: new Date(2011, 10, 21)}, {v: 123}, {v: 3}, {v: 16}, {v: 12}]);data_table.addRow([{v: new Date(2011, 10, 22)}, {v: 130}, {v: 1}, {v: 9}, {v: 22}]);data_table.addRow([{v: new Date(2011, 10, 23)}, {v: 155}, {v: 2}, {v: 15}, {v: 8}]);data_table.addRow([{v: new Date(2011, 10, 24)}, {v: 118}, {v: 3}, {v: 3}, {v: 11}]);data_table.addRow([{v: new Date(2011, 10, 25)}, {v: 99}, {v: 2}, {v: 7}, {v: 11}]);data_table.addRow([{v: new Date(2011, 10, 26)}, {v: 58}, {v: 0}, {v: 1}, {v: 16}]);data_table.addRow([{v: new Date(2011, 10, 27)}, {v: 45}, {v: 0}, {v: 1}, {v: 5}]);
            var chart = new google.visualization.BarChart(document.getElementById('bar_chart'));
            chart.draw(data_table, {width: 860, height: 540, title: 'Ruby CMS Diffusion', vAxis: {title: 'Last week', titleTextStyle: {color: 'red'}}, oAxis: {title: 'RubyGems Downloads', titleTextStyle: {color: 'red'}}});
          }});
        </script>

      </li>
      <li id='geo_chart'>

        <script type='text/javascript'>
          google.load('visualization','1', {packages: ['geochart'], callback: function() {
            var data_table = new google.visualization.DataTable();data_table.addColumn('string', 'Country');data_table.addColumn('number', 'Popularity');data_table.addRow([{v: 'Germany'}, {v: 200}]);data_table.addRow([{v: 'United States'}, {v: 300}]);data_table.addRow([{v: 'Brazil'}, {v: 400}]);data_table.addRow([{v: 'Canada'}, {v: 500}]);data_table.addRow([{v: 'France'}, {v: 600}]);data_table.addRow([{v: 'RU'}, {v: 700}]);
            var chart = new google.visualization.GeoChart(document.getElementById('geo_chart'));
            chart.draw(data_table, {width: 860, height: 540});
          }});
        </script>
      </li>
      <li id='scatter_chart'>

        <script type='text/javascript'>
          google.load('visualization','1', {packages: ['corechart'], callback: function() {
            var data_table = new google.visualization.DataTable();data_table.addColumn('number', 'Age');data_table.addColumn('number', 'Weight');data_table.addRow([{v: 8}, {v: 12}]);data_table.addRow([{v: 4}, {v: 5.5}]);data_table.addRow([{v: 11}, {v: 14}]);data_table.addRow([{v: 4}, {v: 4.5}]);data_table.addRow([{v: 3}, {v: 3.5}]);data_table.addRow([{v: 6.5}, {v: 7}]);
            var chart = new google.visualization.ScatterChart(document.getElementById('scatter_chart'));
            chart.draw(data_table, {width: 860, height: 540, title: 'Age vs. Weight comparison', hAxis: {title: 'Age', minValue: 0, maxValue: 15}, vAxis: {title: 'Weight', minValue: 0, maxValue: 15}, legend: 'none'});
          }});
        </script>
      </li>
    </ul>

  </div>

… here it is the same code seen from FireBug.

I want to slide the three google <script type='text/javascript'> injected into respective selectors <li id='bar_chart'> <li id='geo_chart'> <li id='scatter_chart'> ( see the previous code ).

I’m trying to use this jQuery carousel script to slide html iframe contents but it doesn’t works. The js is the following :

$(function(){
  // Looping carousel
  $("div.carousel_charts").carousel( { autoSlide: true, pagination: true } );
});

which is based on jquery.carousel.min.js. I’m currently using Rails-3.1.3 but pipelining works fine and this seems a more general js issue.

No idea of what’s wrong with that ( but I’m not a ‘frontend developer’ )

Any Idea ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:13:31+00:00Added an answer on May 27, 2026 at 5:13 am

    Luca,

    From what i’ve seen after playing with the code you’ve passed in question, you can solve the issue by specifying some elements’ sizes with the CSS like this:

    <style>
      #bar_chart, #geo_chart, #scatter_chart {
         height: 320px;
         width: 240px;
         display: block;
         float: left;
      }
      .carousel_charts ul {
         display: block;
         margin: 0;
         padding: 0;
      }
      .carousel-wrap {
         width: 240px;
      }
    </style>
    

    After applying above rules there is no need of specifying Google Chart size, so you can skip {width: 860; height: 540} from any chart.draw() call. Here is my result page code for your reference: http://pastebin.com/x0tpz1dq

    Please note – chart sizes are changed for illustration purpose.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried making a wrapper class that encapsulates an object, a string (for naming
Using J2SE, I tried making a LAN application using java.net.*, and it worked perfectly.
I'm writing an app for WM that handles incoming SMS events. I tried making
I'm making the script for easy upload many files. I've tried fyneworks plugin ,
Tried following the instructions here: How to use Google app engine with my own
Tried this: $('.link').click(function(e) { $.getScript('http://www.google.com/uds/api?file=uds.js&amp;v=1.0', function() { $('body').append('<p>GOOGLE API (UDS) is loaded</p>'); }); return
I am making several custom DataGridViewCell classes to handle various cases in my C#
I'm making a request to a website via the HttpWebRequest/HttpWebResponse objects. I'm making several
Our company is making a mobile version of our website. We have several product
I'm working on a solution in Visual Studio 2010 Ultimate that contains two C#

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.