I know when I want to pass a property as an argument I can use [x] but is it possible to pass
an argument that consists of two properteis and a : in between ?
function boson(w,z){
$(w).stop().animate({
z
},{
duration:2000
})
}
boson(".class","Left:'100%'")
I get a syntax error as I leave z as it is..
Why not just pass an entire object?
http://api.jquery.com/jQuery.extend/
This way it’s easier if you decide to add in multiple properties later, without having to change your entire function 🙂