Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
22
rated 0 times [  27] [ 5]  / answers: 1 / hits: 115348  / 12 Years ago, thu, october 18, 2012, 12:00:00

I have a list of outerItems. Inside each outerItem, I have a list of innerItems. They are dynamically sorted.


When mouse cursor points at one of innerItems, I have to show the popup window right above that innerItem element.


Popup div is body's child, because I do not want to have a separate popup for each of innerItems.


The way as I see it — on ng-mouseover I call the function that sets left/top properties to my absolutely positioned popup. So for each of innerItems I'd like to call jQuery .offset() method that gives me left/top values from the top-left corner of page.


So how can I get jQuery object of current scope element? Or, if I've chosen the wrong way


More From » jquery

 Answers
39

In controller:



function innerItem($scope, $element){
var jQueryInnerItem = $($element);
}

[#82489] Tuesday, October 16, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
raymondd

Total Points: 620
Total Questions: 112
Total Answers: 94

Location: Namibia
Member since Mon, Feb 21, 2022
2 Years ago
raymondd questions
Thu, Apr 22, 21, 00:00, 3 Years ago
Thu, Jul 9, 20, 00:00, 4 Years ago
Thu, Apr 9, 20, 00:00, 4 Years ago
Thu, Jul 25, 19, 00:00, 5 Years ago
;