Ask questions and get good answers on jQuery

Hi there! I was wondering if there was a way to add new tabs/divs to mbScrollable?

right now I have this (and it doesn't seem to be working). in document ready: $("#myScroll").mbScrollable({ width:700, elementsInPage:3, elementMargin:4, shadow:"#999 2px 2px 2px", height:"auto", controls:"#controls", slideTimer:600, autoscroll:false, scrollTimer:2000
});

function to add new div:

{ randOtherPersonNum = ""; for (i = 1; i <= 5; i = i + 1) { randFiveString = String.fromCharCode(97 + Math.round(Math.random() * 25)); randOtherPersonNum += randFiveString; }

newRandDiv = "<DIV ID=\"" + randOtherPersonNum + "\" CLASS=\"scrollEl\"> <\/DIV>";
$('#myScroll').append (newRandDiv);
newRandDivHash = "#" + randOtherPersonNum;

id = document.getElementById('id').value;
otherPersonData = "my_user_id="+id+"&"+"other_user_id="+musician_id
$.ajax({ type: 'GET', url: 'scripts/other-person.php', data: otherPersonData, dataType: 'html',success: function(returnData) { $(newRandDivHash).append (returnData);}});

return false; }

Any ideas? THANKS!

asked Nov 08 '09 at 18:34

Rob's gravatar image

Rob
211


The jquery.mb.scrollable component defines all the elements and the behaviors and startup; this prevents the possibility to add elements on the fly other than recalculate dimentions, indexes and positions of all the other elements. I'make a new method to do that for next release.

answered Nov 09 '09 at 19:58

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

Asked: Nov 08 '09 at 18:34

Seen: 349 times

Last updated: Feb 03 '10 at 10:27

Related questions

jQuery main site - Matteo Bicocchi