{"action":"opened","issue":{"url":"https://api.github.com/repos/kenwheeler/slick/issues/2277","repository_url":"https://api.github.com/repos/kenwheeler/slick","labels_url":"https://api.github.com/repos/kenwheeler/slick/issues/2277/labels{/name}","comments_url":"https://api.github.com/repos/kenwheeler/slick/issues/2277/comments","events_url":"https://api.github.com/repos/kenwheeler/slick/issues/2277/events","html_url":"https://github.com/kenwheeler/slick/issues/2277","id":151185543,"number":2277,"title":"hi kenwheeler","user":{"login":"440459012","id":8831983,"avatar_url":"https://avatars.githubusercontent.com/u/8831983?v=3","gravatar_id":"","url":"https://api.github.com/users/440459012","html_url":"https://github.com/440459012","followers_url":"https://api.github.com/users/440459012/followers","following_url":"https://api.github.com/users/440459012/following{/other_user}","gists_url":"https://api.github.com/users/440459012/gists{/gist_id}","starred_url":"https://api.github.com/users/440459012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/440459012/subscriptions","organizations_url":"https://api.github.com/users/440459012/orgs","repos_url":"https://api.github.com/users/440459012/repos","events_url":"https://api.github.com/users/440459012/events{/privacy}","received_events_url":"https://api.github.com/users/440459012/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-26T16:54:02Z","updated_at":"2016-04-26T16:54:02Z","closed_at":null,"body":"> can't get the slick element options on init\r\n\r\n========================\r\n\r\ni tried this:\r\n\r\n`$(infinite_slider).on('init',function(event,slick_element,ele){\r\n        if (slick_element.slideCount < 5){\r\n            slick_element.slick('slickSetOption',{lazyLoad:'progressive',slidesToShow:2},false)\r\n        } else{\r\n            slick_element.slick('slickSetOption',{lazyLoad:'ondemand',slidesToShow:5},true)\r\n        }\r\n    });`\r\n\r\nbut this say:\r\nUncaught TypeError: slick_element.slick is not a function\r\n\r\nhow can i set options for specified element ?\r\nP.S.\r\nthis won't work too...\r\n`$(infinite_slider).on('init',function(event,slick_element,ele){\r\n        if (slick_element.slideCount < 5){\r\n            $(slick_element).slick('slickSetOption',{lazyLoad:'progressive',slidesToShow:2},false)\r\n        } else{\r\n            $(slick_element).slick('slickSetOption',{lazyLoad:'ondemand',slidesToShow:5},true)\r\n        }\r\n    });`\r\n\r\nthanks, sorry for bad english"}}