Hai frnds, today im creating facebook like profile edit with jquery without using any database. Here i used the simple .toggle() function means it toggle two functions when a button is clicked, but the .toggle() function is available upto jquery 1.8 version if any one working with jquery 1.9 or above version it does not work so please download the below 1.8 jquery version. All the versions are available in jquery official site. Simply go to http://jquery.com/download/ website scroll down the page to Past Releases of jquery, Download and Enjoy it.

Sample Screenshot 

facebook like profile edit
In this example i'am including the jquery 1.7 version so dnt worry about it. Just copy the example and paste it in your notepad then save it as .html file and Run it. In the below example i have created the textbox and loaded image dynamically using jquery so observe the example carefully.  


Right Click and save the above two images
 
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
<script>
$(document).ready(function()
{
$('#but').toggle(function(){ 
var val=$('h2').text();
$(this).css({background: 'url(close.gif) no-repeat'})
$('h2').empty();
$('h2').append('<input id="da" type="text" name="box" value="'+val+'"></input>');
},function(){
var value=$("#da" ).val();
 $(this).css({background: 'url(edit.gif) no-repeat'})
$('h2').html(value);
});
});
</script>
<style type="text/css">
<!--
a.edit  {
    float: right;
    background: url(edit.gif) no-repeat;
    padding:100px;
}
-->
</style>
</head>
<body>
<div align="center" style="padding-top:200px">
<div style="width:400px;border:#FF3366;border-radius:8px;
border-style:dotted;height:60px">
<h2>Click here to Edit</h2>
</div>
<div style="width:400px; padding:20px">
<a href="#" class="edit" id="but"></a>
</div>
</div>
</body>
</html>

16 comments:

  1. Education loans are for students after availing quality education. You can apply for the loan online and offline, processing online though is preferred.http://www.thesisexample.info/

    ReplyDelete
  2. I read this article. I think You put a lot of effort to create this article. I appreciate your work.
    thesis Writing Service

    ReplyDelete
  3. It was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. gamo coyote libera vendita

    ReplyDelete
  4. One of the highlights of promoting with Facebook is the upside of watchword interest focusing on. Visit Website

    ReplyDelete
  5. Watch movies online sa-movie.com, watch new movies, series Netflix HD 4K, watch free movies on your mobile phone, Tablet, watch movies on the web. ดูหนังออนไลน์


    SEE4K Watch movies, watch movies, free series, load without interruption, sharp images in HD FullHD 4k, all matters, all tastes, see anywhere, anytime, on mobile phones, tablets, computers. ดูหนังใหม่


    GangManga read manga, read manga, read manga online for free, fast loading, clear images in HD quality, all titles, anywhere, anytime, on mobile, tablet, computer. อ่านการ์ตูน


    Watch live football live24th, watch football online, link to watch live football, watch football for free. ผลบอลสดa

    ReplyDelete
  6. samudra slot merupakan situs judi slot online terpercaya Indonesia yang menyediakan permainan slot games terlengkap bet kecil jackpot besar sangat mudah menang free spin dan bigwin online 24 Jam.

    ReplyDelete
  7. เราคือผู้นำด้านเกมพนันออนไลน์ Major168 เราคือผู้ให้บริการ คาสิโนออนไลน์ ที่ได้รับรองว่าดีที่สุดในประเทศไทย มีค่ายเกมส์ให้เล่นมากมาย Sagaming, Sexy bacarat, Dreamgame, Ebet, Wm casino, Vivo gaming ไม่ผ่านเอเย่นต์ ระบบปลอดภัยมีทีมงานดูแลตลอด 24ชม.

    SAGAME88 แหล่งรวมเกมส์พนันออนไลน์ คาสิโนสด บาคาร่า กำถั่ว คาสิโนออนไลน์ ไฮโล รูเล็ต รับเครดิตฟรีเล่นได้ทุกเกมส์ โบนัสสมาชิกใหม่เพียบ พร้อมระบบฝากถอนออโต้ 10วิ เรามีทุกค่ายเกมส์ให้คุณเลือกเดิมพัน SA Game Sexy bacarat Dreamgame WM Casino VIVO Gaming Ebet เล่นได้ทุกเกมส์

    Our website ufabet provides betting services in the system of Auto Deposit-Withdrawal. Our members are not only in Thailand. Online football betting UEFA Bet market And this makes a guarantee that Ufabet168 is another reliable football betting website

    ufa through the website UFABET1688 a web gambling online , one that integrated all the bets from online casinos , online casino , online , and also have a game a lot more to be chosen to play such games.


    ReplyDelete
  8. Thanks a lot for sharing this excellent article. Visitors will feel enjoy finding important things in your content. I am happy for myself and visitors for sharing this article.

    buy instagram likes

    ReplyDelete
  9. We provide a wide range of asset protection services to safeguard our clients' valuable assets from criminals like thieves. We are experts at protecting high-value one-off assets, exclusive/high-end car collections, racehorses, diamond (jewels), fine art, among others. security services We apply modern security technology, robust management, and proven technologies to mitigate all potential risks.

    ReplyDelete
  10. In this contemporary world, it has become responsible to get to each and everything with present day advances; subsequently, gaming peripherals are the best gaming gadgets which solace the gamers who love to play the best games with simple and open gadget to play their abilities. 먹튀검증
    먹튀사이트

    ReplyDelete

 
Top