Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#btnSort').on("click",
- function () {
- $("#sortorder").css({
- 'position': 'absolute',
- 'z-index': '99',
- 'left': $(this).offset().right,
- 'top': $(this).offset().top + $(this).height() + 5
- }).slideToggle().delay(1000);
- });
- var width = $(window).width();
- $.fn.positionFunction = function () {
- if (width < 500) {
- $("#styleList").css({
- 'position': 'absolute',
- 'z-index': '99',
- 'left': $(this).offset().right,
- 'top': $(this).offset().top + $(this).height() + 5
- }).slideToggle(1000);
- } else {
- $("#styleList").css({
- 'position': 'absolute',
- 'z-index': '99',
- 'left': $(this).offset().left, <----------Error
- 'top': $(this).offset().top + $(this).height() + 5
- }).slideToggle(1000);
- }
- }
- $('#btnStyle').on("click", function() {
- $.fn.positionFunction();
- });
Add Comment
Please, Sign In to add comment