so I created a function that has 2 arguments for the css method, I run it but the arguments are getting read. The width values work on hover off and on, but w/e value i pass through in the arguments are getting read
function growImg(targetClass, imgClass, growPosition, growVal){
$(targetClass).hover(
function(){
$(imgClass).css({'width': '25rem', growPosition : growVal});
},
function(){
$(imgClass).css({'width' : '12em'});
}
)
}
// Calling function here
growImg('.img-profile', '.profile-img', 'top', '25px')
Any help would be great