Jssor Slider GoTo() for Thumbnails - jssor

First of all: Great Plugin. Thank you!
1) For any slider with thumbnails for example Image Gallery), when selecting a specific thumbnail, it appears to use PlayTo().
How would I use GoTo() - instead of PlayTo() - for all thumbnails, to display the full slide for that thumbnail?
2) What is $Align as it applies to ThumbnailNavigatorOptions or Slider Options?
3) What is $Steps as it applies to ArrowNavigatorOptions?
Thank you.

Re 1: Use GoTo() instead of PlayTo()
Please set $SlideDuration to 0
Re 2: What is $Align?
$Alignspecifies the position that the current slide aligns its left side to 'slides' container. It applies to both 'Slider Options' and '$ThumbnailNavigatorOptions'.
Re 3: $Steps for $ArrowNavigatorOptions
It means steps to go for each navigation request.
e.g. given the value of $Steps is 3, when you click the 'right' arrow, it will go through 3 slides.

Related

Delphi Anchor and Form.HorizontalScrollbar.Range Panel Anchor akRight ignores HorizontalScrollbar.Range

I have here a very simple form for demonstration purposes . On Form Show I only do this :
Form1.HorzScrollBar.Range:=1200;
My Problem is if I resize the Form and the Formsize becomes less then 1200 , the Panel akRight anchor is not taking into account Actual Form size , instead it seems to look at the Visible Form Size...
See Screenshot
I am probably doing here something wrong , can someone enlighten me.
To make the panel growing with the form beyond 1200, but prevent the panel from shrinking below 1200, you can set for the panel:
Set the akRight anchor (in addition to akLeft)
Set the Constraint.MinWidth = 1200

How To Position a Picture on A Second Page Of A Word Document VB6

I am making a program that repeatedly creates pages of an undefined quantity, and on the top of all the pages is a logo that is in a certain position. If I have everything in a for loop and at the end I include these commands to make a page break:
Set oRng = oDoc.Bookmarks("\EndOfDoc").Range
oRng.InsertBreak
The second time (and subsequent times) the table I make goes on the the next page, but the image does not. I have tried setting the "top" property to
distFromTop + pageLength * pageNumber.
I would assume it might have to do with the anchor property, but I have no idea what data type that even gets or how it affects the placement
I insert the image using:
oDoc.Shapes.AddPicture "C:\Users\name\Desktop\file.jpg", , , CentimetersToPoints(1.3), CentimetersToPoints(0.9 + pageLength * j), CentimetersToPoints(6.1), CentimetersToPoints(2.9)
The picture adds multiple times, but both to .9 from the top on the first page and 1.3 from the left, on the first page.
How can I make the pic go .9 from the top of a certain page
EDIT: I would like to avoid putting it in a header because that would mess up the alignment of the other elements of the doc
Ok, So what worked for me was this:
Set oRng = oDoc.Bookmarks("\EndOfDoc").Range
oRng.InsertBreak
oDoc.Shapes.AddPicture "C:\Users\me\Desktop\file.jpg", , , CentimetersToPoints(1.3),
CentimetersToPoints(0.9), CentimetersToPoints(6.1), CentimetersToPoints(2.9),
oDoc.Bookmarks("\EndOfDoc").Range
I still don't quite understand why it works, because the documentation for a range objects / anchors was fairly hard for me to understand... I tried this out and this worked. For my purposes that worked, but if anyone knows why that works I would love to know
Thanks for your answers

Nivo Slider restart to slide 1

Is there a way to make the Nivo Slider go back to the first slide manually?
So that if I press a button it will restart the slider from the beginning.
-Thanks
Yes, if you're using the jQuery version refer to this http://nivo.dev7studios.com/support/jquery-plugin-usage/
You want to set controlNav: true then you will get the page selection like the demo on their page.
If you ONLY want to give them an option to return to slide 0 and not pick each one individually then you'll have to modify the slider since there is no default behavior that supports that.
You don't have to modify the slider...
var idx = 0; // '0' is the first slide
// set nivo's currentSlide var to one before the idx value
$('#slider').data('nivo:vars').currentSlide = idx - 1;
// trigger a nextNav click
$("#slider a.nivo-nextNav").trigger('click'); // trigger a click on the nextNav

spark form item gap in Flex

Is there a way to change the space between a spark form item and its content(textinput, conbobox)? I already set to 0 the "gap" property of the form, but still there is a lot of vertical space left between the form inputs.
Set the gap to -14 to get no gap between the items
<s:Form>
<s:layout>
<s:FormLayout gap="-14"/>
</s:layout>
<s:FormItem .....>
</s:Form>
The spark skin for formItem has left/right variables set based on "columns." I.e. left="column1:10" means the element is 10 pixels to the right of column 1.
So, create the skin, reduce those numbers in the "content" column area and check it.
Reducing all those numbers and the gap should tighten, along with setting the gap in form layout.
If you want to change the vertical gap between each Spark Form Item, create a custom skin based on FormSkin and change the gap property FormLayout.
If you want to change the horizontal gap between skin parts (labelDisplay, indicatorDisplay, helpContentGroup, ...), you need to create a custom skin based on FormItemSkin and change the ConstraintColumn values
I changed in my custom FormItem skin as followed, and it worked for me:
before:
<s:ConstraintRow id="row1" baseline="maxAscent:10" height="100%"/>
after:
<s:ConstraintRow id="row1" baseline="maxAscent:0" height="100%"/>
There are no paddingLeft, paddingRight etc. properties in FormItemLayout yet.

jquery .attr('alt','logo').css('display','none') not working !

I have the three following lines and the first two line gets all the images on the document and hides all, but then when I add the third line shows all the images.
What I need its to hide only the images with the attribute alt=minimize and alt=maximize but for some reason hides all the images.
$('img').attr('alt', 'minimize').css("display","none");
$('img').attr('alt', 'maximize').css("display","none");
$('img').attr('alt', 'logo').css("display","inline");
I am using IE7, but it should be compatible with IE6 and IE8.
Any help would be very much appreciated.
Thanks.
I'm thinking you are not using the attr function correctly, might you be looking for the attribute equals selector?:
$('img[alt=minimize]').css("display","none");
What you did with your code was,
Select all images
Change their alt attribute to 'minimize'
Hide them
Select all images
Change their alt attribute to 'maximize'
Hide them
Select all images
Change their alt attribute to 'logo'
Hide them
what you do: you take every img in document and set alt to logo and then set display: inline;.
Note, that attr('alt',string) doesn't filter all images to those with alt=string, but rather sets alt attribute to string on all images.
What you want to use is this:
$('img[alt="minimize"]').css...
$('img[alt="maximize"]').css...
$('img[alt="logo"]').css...
In the call $('img').attr('alt', 'logo').css("display","inline"); the "attr" doesen't filter the set of dom elements You catch with $("img").
If you want to hide everithing but not the image with the attribute 'alt' = 'logo' I think You can:
give it an Id of logo and then calling: $("img").not("#logo").hide()
from the jquery website:
hide():
The matched elements will be hidden
immediately, with no animation. This
is roughly equivalent to calling
.css('display', 'none'), except that
the value of the display property is
saved in jQuery's data cache so that
display can later be restored to its
initial value. If an element has a
display value of inline, then is
hidden and shown, it will once again
be displayed inline.
and
attr( attributeName )
Returns: String
Description: Get the value of an
attribute for the first element in the
set of matched elements.
If instead you want to hide all the maximize and minimize images (both share the "imize" part of the attribute):
$(parentElement).find("img[#attr $= '*imize']").hide()
OP is referring to
http://dev.w3.org/csswg/css3-values/#attr
alt I think is simply a string type, not "logo" whatever that is, that is not a data type.
try that. in fact, you can look up alt in the html5 img
http://www.w3.org/TR/html5/the-img-element.html#the-img-element
http://www.w3.org/TR/html5/the-img-element.html#attr-img-alt
http://www.w3.org/TR/html5/the-img-element.html#alt
(in order of reference clicking, last one is the target)
even if this isn't the exact answer (it should be), it should be a step in the right direction.
I am actually trying myself to figure out how to reference a css property within css with attr() - it's mentioned within the top URL. if I had my druthers, I could be using css calc() along with it, but that's draft. maybe I can get it to work...