سؤال

Its a followup question of this. I'm trying to wrap the selected text in a div using window.getSelection() but its not working in iPad because window.getSelection().rangeCount is 0.

Demo: http://jsfiddle.net/codef0rmer/jE4w5/

Is there any workaround for this to work in iPad?

هل كانت مفيدة؟

المحلول

You can use rangy for text selection and highlighting. jQuery Mobile along with backbone.js breaks the page so I used jQuery FastClick plugin

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top