I have the code that should highlight a selection and align the popup to the top of the selection. The code is as follows
$('#pnlAdd .modalDialog').css($("tr [style*=Blue]").position().top + "px" ,"top");
Firefox seem to be ok with the code, but I get the following runtime error
'position().top' is null or not an object.
Found this link but my edit was unsuccessful. Is there another way to do that?
Your .css() arguments are backwards; it should be
.css(<name of property>, <value>)Also,
.position()will return null if$("tr [style*=Blue]")doesn’t return anything, causing an error. Try checking its length first.EDIT NOTE
Firefox use initial caps on the colors (Blue) but IE use all lowercase (blue).