Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------script that doesn't work-----------------------------------------------
- <script type="text/javascript">
- $(document).ready(function()
- {
- $.ajax(
- {
- type: "GET",
- url: "http://instartius.com/android/hippocamp.xml",
- dataType: "xml",
- success: function(xml)
- {
- var container = document.getElementById("catalogue");
- container.setAttribute('data-role', 'collapsible-set');
- $(xml).find('note').each(
- function()
- {
- var release = document.createElement("div");
- release.setAttribute('data-role', 'collapsible');
- var to = $(this).find('to').text();
- var from = $(this).find('from').text();
- var heading = $(this).find('heading').text();
- release.innerHTML = "<h3> to:" + to + ", from: " + from + " heading: " + heading + "</h3>";
- container.appendChild(release);
- }
- );
- var catDiv = $('#catalogue');
- catDiv.find('div[data-role=collapsible]').collapsible(
- {
- theme:'c',refresh:true
- }
- );
- }
- }
- );
- }
- );
- </script>
- -------------------------- Script that wroks ----------------------------------------------
- <script type="text/javascript">
- $(document).ready(function()
- {
- $.ajax(
- {
- type: "GET",
- url: "hippocamp.xml",
- dataType: "xml",
- success: function(xml)
- {
- var container = document.getElementById("catalogue");
- container.setAttribute('data-role', 'collapsible-set');
- $(xml).find('note').each(
- function()
- {
- var release = document.createElement("div");
- release.setAttribute('data-role', 'collapsible');
- var to = $(this).find('to').text();
- var from = $(this).find('from').text();
- var heading = $(this).find('heading').text();
- release.innerHTML = "<h3> to:" + to + ", from: " + from + " heading: " + heading + "</h3>";
- container.appendChild(release);
- }
- );
- var catDiv = $('#catalogue');
- catDiv.find('div[data-role=collapsible]').collapsible(
- {
- theme:'c',refresh:true
- }
- );
- }
- }
- );
- }
- );
- </script>
Advertisement
Add Comment
Please, Sign In to add comment