Plugin jQuery ini memudahkan proses mengambil gambar profil dari pelbagai rangkaian sosial, menjimatkan masa apabila menyediakan imej profil untuk aplikasi web atau pendaftaran laman web.
Apa yang dilakukannya:
Profil JQuery Plugin Grabber Plugin mengambil gambar profil dari laman media sosial yang popular. Ini menghapuskan keperluan untuk memuat naik manual.
Penggunaan:
Sertakan kod plugin dalam html anda. Konfigurasikan pilihan seperti yang diperlukan, dan anda sudah bersedia untuk pergi. Teks pautan dan juga ikon boleh disesuaikan.
Contoh HTML (Container Image):
Contoh JavaScript JavaScript (konfigurasi rangkaian):
Soalan Lazim (Soalan Lazim):
$(document).ready(function() {
// Initialize plugin without options
W.myProfPicGrab = new jqProfPicGrab();
});
<div id="profile-container">
<img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/000/174051643760767.jpg" class="lazy" alt="jQuery Profile Picture Grabber Plugin " />
</div>
$(document).ready(function() {
// Initialize with specific networks and defaults
W.myProfPicGrab = new jqProfPicGrab({
container: '#demo2',
showUrl: true,
networks: {
gravatar: { show: true, text: 'Use Gravatar', default: 'http://www.gravatar.com/avatar/03490f81e70d7e43a5769a0a886e0314' },
facebook: { show: true, text: 'Use Facebook', default: 'http://graph.facebook.com/samuelleedeering/picture?type=large' },
twitter: { show: true, text: 'Use Twitter', default: 'http://api.twitter.com/1/users/profile_image?screen_name=samdeering&size=original' },
googleplus: { show: true, text: 'Use Google Plus', default: 'https://plus.google.com/s2/photos/profile/samdeering' },
directurl: { show: true, text: 'My Blog Logo', default: 'http://jquery4u.com/images/logo.png' },
default: { show: true, text: 'Use Default', default: '' }
}
});
});
Atas ialah kandungan terperinci Plugin Gambar Gambar Profil JQuery. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!