Jump to content
GreenSock

SplitText.selector

SplitText.selector : *

[static] When you pass a string to a SplitText (as the first parameter), it will feed that to its selector engine internally to find the element(s), and document.querySelectorAll() is used by default, or jQuery if it happens to be loaded.

Details

When you pass a string to a SplitText (as the first parameter), it will feed that to its selector engine internally to find the element(s), and document.querySelectorAll() is used by default, or jQuery if it happens to be loaded. You can define a custom selector engine like Sizzle or Zepto or your own like this:

//use Zepto
SplitText.selector = Zepto;
//use Sizzle:
SplitText.selector = Sizzle;
//or use your own:
SplitText.selector = function(text) {
    return document.querySelectorAll(text); 
}
Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.
×