views:

374

answers:

1

I have some tabs I working with in Silverlight because of issues I'm having with JQuery UI in Internet Explorer. I want to style the tabs in sliverlight to look like the ones from JQuery UI but can only seem to get the to take some washed out colors.

Dose anyone know of any links that describe how to do this? Is there a way to set an image as the tab?

A: 

I tried to use the jQuery UI tabs plugin and had a lot of problems, but quickly found it was very easy to create my own.

Something like this... obviously you can skin this to your requirements

<div class="navcontainer">
 <ul>
  <li><a class="tab" id="p1" href="#1">Tab One</a></li>
  <li><a class="tab" id="p2" href="#2">Tab Two</a></li> 
 </ul>
</div>

Then in JS

var pageUrl = new Array();    
pageUrl[1] = "pageone.php";
pageUrl[2] = "pagetwo.php";

$(document).ready(function() { 

 $(".tab").click(function() {
  loadTab($(this).attr('id')); 
 });

});

function loadTab(id) {
 if (pageUrl[id].length > 0) {
  $("#preloader").show();
  $.ajax({
   url: pageUrl[id], 
   cache: false,
   success: function(message) {                
    $("#tabdiv").empty().append(message);
   }
  });             
 }
}

Not quite the exact Silverlight answer, so sorry if you don't find this very helpful. But hopefully might save you some time.

adam