Wrapping a link with a div element and disabling line break divs
I wrapped the link with the div element
$("a[href$='name']").wrap("<div />"); The div element causes line breaks. To prevent this behavior, I would like to style my div element with style = "white-space: nowrap;".
I tried
$("a[href$='name']").wrap("<div style='white-space: nowrap;'></div>"); For some reason this does not work. No error is displayed. However, line breaks are still active.
What happened to my fragment?
Thank you for your help.
+4