You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Forum user: bercium

Basic information

Registered Sep 8, 2009
Last login Sep 8, 2009
Forum posts 8
Direct URL http://www.flowplayer.org/forum/users/15251

Latest forum posts

Posts:

Registered:

» » » » Changing size (number of visible items)

Posted: Sep 9, 2009

Thanks, it works.

Posts:

Registered:

» » Changing size (number of visible items)

Posted: Sep 9, 2009

Well I know example is for equal widths, but I don't think it would be so different for variable item sizes (maybe calculate average width/height). But anyway this should be an optional parameter which you could set if you wish to have size calculated automatically.

Or at least if it is possible to change number of visible items ('size' parameter) after initialization of scrollable?
Like a function 'setSize()' or something? Or does it already exit?

Posts:

Registered:

» » » » Dynamic hint change?

Posted: Sep 9, 2009

Thanks

Posts:

Registered:

Changing size (number of visible items)

Posted: Sep 9, 2009

Would it be possible to add functionality for automatic calculation of items? Or at least add function setSize() to set it manually during run-time.
This could be really useful with dynamic changing scroll box, where you set the width to 100% and just call reload() on resize.

Code for automaticaly calculating size could be something like this:

  if (conf.autoSize){
    var autoCalcItem = self.getItems().filter(":first");
    if (horizontal){
      conf.size = Math.floor( root.innerWidth() / autoCalcItem.outerWidth(true) );
    }else{
      conf.size = Math.floor( root.innerHeight() / autoCalcItem.outerHeight(true) );
    }
  }
Get the whole width/height (depending on orientation) of scroll box and divide it with first items's width/height (most of the time they have the same width/height).

Posts:

Registered:

» » Dynamic hint change?

Posted: Sep 9, 2009

Thank you for your replay, but I've also tried changing data attribute (title) with no success. I know about cancelDefault and if I disable it default attribute is shown correctly while tooltip still shows first value.
If I try changing title attribute then default tooltip apears since title isn't removed by tooltip script. Even if I call tooltip() function again after setting title with data or just with attribute nothing changes.

Here is the example of script I use (with added alert to show values). But tooltip still doesn't change.

.click(function(){
  if (...){
    $(this).data("title","Default text");
    //$(this).attr("title","Default text");
    //$(this).tooltip(tooltip_opts);
  }else{
    alert($(this).data("title"));  // outputs: default text
    $(this).data("title","Changed text");
    //$(this).tooltip(tooltip_opts);
    alert($(this).data("title"));  // outputs: changed text
  }

Posts:

Registered:

» » » » Does location of the tooltip container matter?

Posted: Sep 8, 2009

I have actually changed the code inside tooltip component.
I believe author should fix this, but until then you can just find the function 'position()' inside the component code and replace it with 'offset()'. There are just two instances of that function inside tooltip component.

Be careful if you have downloaded more than one component in the same .js file, since other components may also use position() function.

Posts:

Registered:

Dynamic hint change?

Posted: Sep 8, 2009

Is it possible to change hint dynamically.
For example we have a toggle button like minimize/restore, where at the beginning hint should say 'minimize' and after clicking it should say 'restore'.
I have tried to set the title attribute again and calling tooltip() function for that element but it doesn't work (it used to work in previous version)

Posts:

Registered:

» » Does location of the tooltip container matter?

Posted: Sep 8, 2009

From what is written for jQuery's position() function it returns position "...relative to its offset parent". In case you have absolutely positioned element somewhere on page and inside trigger element positioned on 0,0 hint will be shown on position 0,0 of document rather than correct position. I think function offset() should rather be used since it returns position "...relative to the document".
Today I had the same problem solved it with replacing the position() function with offset().