I'm trying to bind and image to the background of a div but having trouble due to the need to add 'url()' to the image. In the example below if selectedPhoto is just the path to the file "/image/somefile.jpg" then it doesn't work. If selectedPhoto is "url('/image/somefile.jpg')" then it works. Is there a way to add in url() in the binding around the variable selectedPhoto without having to including it in the value of the variable?
I cross posted this under an older thread but wasn't sure if I would get a response.
http://www.kendoui.com/forums/framework/mvvm/problem-in-binding-style-in-template.aspx
Thanks,
Brad
data-bind="style: { backgroundImage: selectedPhoto }"
I cross posted this under an older thread but wasn't sure if I would get a response.
http://www.kendoui.com/forums/framework/mvvm/problem-in-binding-style-in-template.aspx
Thanks,
Brad