why Dreaweaver highlight as RegExp what’s wrong with my code?
$(this).attr({'width':this.width /2, 'height':this.height/ 2});
its highlight from /2 to /2.
thank you
I used this code for <img/> tag I think its better use attr() instead of css()
The regex highlighting has nothing to do with your code. It’s a major highlighting problem which has been present in DreamWeaver for as long as I’ve used it (DW CS5 – CS6).
Object properties shouldn’t be quoted and I’m not sure if
this.widthandthis.heightreturn what you’re expecting. Also you shouldn’t use attributes for that, use.css()when you want to apply styling. HTML Attributes are deprecated for that.