Method toggle () and position () together in jQuery

0

Is it possible to use the toggle () and position () methods in the same line of code? For example:

$("#palette-base-category-"+category).toggle("drop", 1000).position({my:"right", at:"right", of:null});

att

    
asked by anonymous 28.04.2017 / 13:28

1 answer

1

Possible most of the time is, I just do not see a utility in doing this, note that position() by definition returns an object that contains the top and left properties and according to documentation", it does not accept any parameters, and toggle() simply shows or hides elements, so I have not been able to find a joint use in a single line of code so far, if the question is not just a curiosity and you really want to do something like that, can you clarify more doubts, I hope it helps.

    
28.04.2017 / 13:44