현재 GreyScale 호버 효과를 적용하는 jQuery 플러그인을 사용하고 있습니다. 플러그인이 완벽하게 작동합니다.ajax 호출 후 jQuery 함수 재 초기화
플러그인이 작동중인 페이지는 아약스 기반 필터링을 사용합니다. 이 때문에 아래 코드는 초기로드에서만 올바르게 작동합니다. 각 필터에서 두 요소를 다시 초기화 할 수 있어야합니다.
내가 jQuery를 1.7.2 사용하고 있지만,이 작업을 얻을 수 없기 때문에 내가 $(document).on
실험 된 ..
$(function() {
// fade in the grayscaled images to avoid visual jump
$('.colour img').hide().fadeIn(1000);
});
// user window.load to ensure images have been loaded
$(window).load(function() {
$('.colour img').greyScale({
// call the plugin with non-defult fadeTime (default: 400ms)
fadeTime: 500,
reverse: false
});
});
당신은 좀 더 코드 – mprabhat