This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

A part of camera image on site
#3
Yes, now I am preparing such solution by hiding some part by CSS and if must be JS. Idea is to have this sight without any button.

This is what I've prepared but there is some problem with adding transform parameters. Console log shows on this line "image.css is not a function". Maybe somebody has some advice?

Code:
// Camera preset
$(function(){

function preset_image(){
box = $('.rolety_w0');
image = box[0].children[0];

box.attr("width","264");
box.attr("height","512");
image.css({'transform': 'scale(1.5) translate(-100px -100px)'});
 }
 
// On load execution
$('.rolety_w0').load(function() {
preset_image();
});  
 
// Check for changes on value of item with rolety_w0
$(".rolety_w0").bind("DOMSubtreeModified",function(){
preset_image();
});
 
});
Reply


Messages In This Thread
A part of camera image on site - by buuuudzik - 10.01.2017, 16:30
RE: A part of camera image on site - by buuuudzik - 10.01.2017, 16:57

Forum Jump: