score:1
With jQuery mobile you need to put your page specific scripts and styles inside the page-content
div. See "Known Limitations" in documentation.
score:1
I have tried what Tsar mentioned and for me it worked. What I did was:
Added the script within the head tag, and added the div with the ID(rederTo) used in the script within the "page-content".
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Acura</title>
<link href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
<script src="libs/hightcharts/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<script type="text/javascript">
var chart1; // globally available
$(document).ready(function() {
chart1 = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'bar'
},
title: {
text: 'Fruit Consumption'
},
xAxis: {
categories: ['Apples', 'Bananas', 'Oranges']
},
yAxis: {
title: {
text: 'Fruit eaten'
}
},
series: [{
name: 'Jane',
data: [1, 0, 4]
}, {
name: 'John',
data: [5, 7, 3]
}]
});
});
</script>
</head>
<body>
<div id="ge" data-role="page">
<div data-role="header">
//header
</div>
<div data-role="content">
<div id="container"></div>
</div>
</div>
</body>
</html>
score:4
I had this same problem when I first started coding with jQuery Mobile... You have to bind your scripts on pagecreate, ie:
$(document).delegate("#page-id", "pagecreate", function() {
// highcharts, etc.
}
Source: stackoverflow.com
Related Query
- JQuery mobile and highcharts integration
- Highcharts and jQuery Mobile Pages
- Loading Highcharts via shim using RequireJS and maintaining jQuery dependency
- jQuery UI Tabs and Highcharts display/rendering issue
- Highcharts / jQuery - destroy and rebuild chart with original options
- Showing HighCharts in A JQuery Mobile application
- Highcharts v3.0.1 problems with rotating data labels in IE8 and jQuery v1.7.1
- Highcharts - Global configuration with common code and unique data & Headings
- Simple bar chart in jQuery HighCharts and MVC 2 application?
- Highcharts no longer animates and readjusts/rescales chart upon addition and removal of series in legend after upgrading to jQuery 1.10
- highcharts with only javascript and no jquery
- Javascript Highcharts High buttons and calender with jquery
- Conflict between Highcharts and JQuery 1.8.2
- highcharts without jQuery and JSPM
- invalid character error with jquery and highcharts SCRIPT1014: Invalid character
- Converted PHP code that built an array to JS and now highcharts doesn't work - what did I do wrong?
- Dynamic column based highcharts feeding data with jquery and php
- Highcharts in JQuery Tabs - Resizing hidden tab code stops resizing visible tab
- Django chartit loading jquery and highcharts js
- Highcharts with JQuery mobile Black display
- JQuery UI tabs and multiple Highcharts
- Highcharts and jQuery animate: Snaps back to original size; only works when window is resized
- Highcharts prevent page on mobile Safari from moving up and down as I scroll horizontally through data points
- how can I use rangeselector and navigation in highcharts in the given code
- Calling Highcharts export to jpeg but the source is https and exporting is http (security warnings issued by browser)
- I cannot pass in a variable into the highcharts function using jquery and pug.
- highcharts in new window with ajax and jquery
- Dynamically changing Highcharts Theme through Jquery code not working
- Passing data from JSP to jQuery and plotting in Highcharts
- Loading multiple variables using Highcharts and jquery with php
More Query from same tag
- Printchart title in highcharts when clicking print button when chart title is null
- Last y-axis label not displaying on highcharts spiderweb
- create a ranking and statistics with repeated database records
- Highcharts / HighStock gapUnit breaks navigator
- Selectable axis labels on highcharts
- Set datetime format in x-axis of Highchart
- Formatting JSON_ENCODED data PHP Highcharts
- Building different types of Highcharts Programmatically.
- Area spline chart using Highchart
- tool that shows javascript errors in code
- Plotting multiple series from JSON php import to Highcharts
- Highchart chinese colon display incorrect when exporting
- How to add separate annotation style tooltip for Highcharts marker?
- highstock charts - button for date range
- highcharts: how can I show the floats as datetime in the xAxis correctly
- What's the difference between 'legend' and 'showInLegend' in highcharts
- Highcharts tooltip showing selected points
- Highcharts Remove Space across the x-Axis
- Highcharts bar chart json example?
- How do I select a series in a spline by clicking on the spline in between the points?
- Dynamic hover color in highmap
- Loading JSON into a Highcharts pie chart
- How to get y-axis boundary line using highchart?
- Highstock Candlestick connect nulls or zero's
- High (Pie) Charts Incorrect Calculation
- Highcharts combination chart from JSON data
- highchart funnel horizontal
- JIRA Gadget Plugin with HighCharts
- Highmaps country map not showing when using type: "mappoint"
- Is it possible to position Highcharts dataLabels depending on the value?