Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery window offset top

// How to get the top offset:
var x = $(selector).offset()
console.log(x.top)

/**
	Some other info that you might find helpful :)
*/

// Return the offset coordinates:
$(selector).offset()

// Set the offset coordinates:
$(selector).offset({top:value,left:value})

// Set offset coordinates using a function:
$(selector).offset(function(index,currentoffset))
 
PREVIOUS NEXT
Tagged: #jquery #window #offset #top
ADD COMMENT
Topic
Name
4+1 =