Hi I am just doing user profiles, and figured would be cool to allow them to add a facebook link to their profile, and preview it on click, or in a modal window, but thats the easy bit.
I have done a fiddle: http://jsfiddle.net/ozzy/kw7gH/1/
Essentially, I want user to type a facebook ID into the input box, show a preview and then the typed text they did gets appended to the href link so that on click it tests that url.
js is:
$(function(){
$(".facebookID").keyup(function(){
var facebookID=$(this).val();
$(".facebookID_preview").html(facebookID);
return false;
});
});
basically I want to add the typed text to the href link so if they typed stackoverflow , the link would be http://facebook.com/stackoverflow
What about adding
before the
return falsestatement? Note that the selector for the link probably needs to be a bit more specific in a real webpage environment…