mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-18 09:11:39 +00:00
minor refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
9fe814120e
commit
5a8f676fbe
@ -196,12 +196,22 @@ var BrowserPrototype = {
|
||||
|
||||
// Select a list element...
|
||||
//
|
||||
// Get selected element if it exists, otherwise select and return
|
||||
// the first...
|
||||
// .select()
|
||||
// -> elem
|
||||
//
|
||||
// Get selected element if it exists, null otherwise...
|
||||
// .select('!')
|
||||
// -> elem
|
||||
// -> $()
|
||||
//
|
||||
// Select first/last child
|
||||
// .select('first')
|
||||
// .select('last')
|
||||
// -> elem
|
||||
//
|
||||
// Select previous/lext child
|
||||
// Select previous/next child
|
||||
// .select('prev')
|
||||
// .select('next')
|
||||
// -> elem
|
||||
@ -210,11 +220,6 @@ var BrowserPrototype = {
|
||||
// .select('none')
|
||||
// -> elem
|
||||
//
|
||||
// Get selected element if it exists, null otherwise...
|
||||
// .select('!')
|
||||
// -> elem
|
||||
// -> $()
|
||||
//
|
||||
// Select element by sequence number
|
||||
// .select(<number>)
|
||||
// -> elem
|
||||
@ -288,6 +293,24 @@ var BrowserPrototype = {
|
||||
}
|
||||
},
|
||||
|
||||
// Select next element...
|
||||
next: function(elem){
|
||||
if(elem != null){
|
||||
this.select(elem)
|
||||
}
|
||||
this.select('next')
|
||||
return this
|
||||
},
|
||||
// Select previous element...
|
||||
prev: function(elem){
|
||||
if(elem != null){
|
||||
this.select(elem)
|
||||
}
|
||||
this.select('prev')
|
||||
return this
|
||||
},
|
||||
|
||||
// Push an element to path / go down one level...
|
||||
push: function(elem){
|
||||
var browser = this.dom
|
||||
var elem = this.select(elem || '!')
|
||||
@ -314,7 +337,7 @@ var BrowserPrototype = {
|
||||
|
||||
return this
|
||||
},
|
||||
// pop an element off the path / go up one level...
|
||||
// Pop an element off the path / go up one level...
|
||||
pop: function(){
|
||||
var browser = this.dom
|
||||
var path = this.path
|
||||
@ -326,20 +349,6 @@ var BrowserPrototype = {
|
||||
|
||||
return this
|
||||
},
|
||||
next: function(elem){
|
||||
if(elem != null){
|
||||
this.select(elem)
|
||||
}
|
||||
this.select('next')
|
||||
return this
|
||||
},
|
||||
prev: function(elem){
|
||||
if(elem != null){
|
||||
this.select(elem)
|
||||
}
|
||||
this.select('prev')
|
||||
return this
|
||||
},
|
||||
|
||||
focus: function(){
|
||||
this.dom.focus()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user