onclick href from xml?

onclick href from xml?

ok so i made some progress today and was able to get the slideToggle with image swap working all by myself  . Stuck yet again though.

  1. var obj={screenpath:$(this).find("screen").attr("path")};
  2. $(data).find("chapter").each(function loopingItems(value){
  3. var chapter = $('<li class="chaptertitle"><img class="img-swap" src="/images/plus.png" class="img-swap" /><strong>' + $(this).attr("label") + '<\/strong><\/li>').appendTo("#screens")
  4. if ($(this).is(':parent')){
  5. var screens=$('<ul><\/ul>').appendTo(chapter)
  6. $(this).children().each(function(){
  7. $('<li class="screentitle" onclick="location.href='+obj.screenpath+'>'+                         $(this).attr("label") +'<\/li>').appendTo(screens)
so basically what i am trying to do is make a clickable link from the path attribute in my xml that will pop-open a video player. Now when i open that page, the li is there with the chapter titles but it won't open the screens list now. Hope that makes sense....

Also, if anyone can point me in the direction on some good tutorials for jquery for beginners, I'd greatly appreciate it.