0

I some code i just started working on,i am trying to read icalendar data. it gives a javascript error b.replace in not a function in js/jquery.icalendar.min.js

Any ideas or help will be highly appreciated,i am in a big trouble with this thing, i dont have time and i have'nt done this before

  <!--iCalendar-->
     <script src="js/jquery.icalendar.min.js"></script>

     <!--JSON-->
     <script src="js/jquery.json.js"></script>

<script type="application/javascript">    $(document).ready(function(){


       var yql_query = "select * from feed where url='"+vars.calendar_feed+"'";

        $.YQL(yql_query,function(content){
                 var ical = $.icalendar.parse(content.query);

                             alert($.toJSON(ical,true));
                 $('#list').listview('refresh');
                 /*$.each(content.query.results.item, function(i, item){
                        //alert(item.title);
                        var listData = "";
                        listData += '<li class="ui-li-has-thumb">';
                        listData += '<img src="images/blog.png" class="ui-li-thumb listImage" />';
                        listData += '<a href="'+item.location+'" rel="external">';
                        listData += '<h1 class="rowTitle">'+item.title+'</h1>';
                        listData += '<p class="rowDescription">'+item.description+'</p>';
                        if(item.pubDate){
                            listData += '<p class="ui-li-aside">'+item.pubDate+'</p>';
                        }
                        listData += '</a>';
                        listData += '</li>';
                        $('#list').append(listData);

                  });*/
                  $('#list').listview('refresh');   //needed to reapply formatting
        });
    });
engr.waqas
  • 375
  • 4
  • 13

1 Answers1

0

I'm thinking this is a jQuery version issue.

Related: How do I run different versions of jQuery on the same page?

If this is the script you're using: http://keith-wood.name/icalendar.html it looks to use jQuery 1.4.4

jQm uses in the new beta 1.6.x and the alpha used 1.5.x which could be the problem

Community
  • 1
  • 1
Phill Pafford
  • 83,471
  • 91
  • 263
  • 383