selecting href not starting with http
Posted
by sushil bharwani
on Stack Overflow
See other posts from Stack Overflow
or by sushil bharwani
Published on 2010-05-31T02:13:27Z
Indexed on
2010/05/31
2:22 UTC
Read the original article
Hit count: 321
jQuery
|jquery-selectors
using jQuery i am trying to find out all the URLS that user has entered which are not starting with http or https and finally i want to prepend http to all such URLs so that when user clicks on them they are taken to a proper site instead of broken link caused due to entry of URLs without http or https.
Also like to mention that User have a field "Websites they Like" where they enter websites of their interest. So if they like stackoverflow, they may end up writing www.stackoverflow.com which will be considered a relative link without http.
Also my requirments are such that i cant prompt user to enter http or https before there urls
© Stack Overflow or respective owner