Find Jobs
Hire Freelancers

Fix jquery/javascript small function

€8-20 EUR

Selesai
Dibuat lebih dari 1 tahun yang lalu

€8-20 EUR

Dibayar ketika dikirim
We need a function to trigger a plugin ([login to view URL] - [login to view URL]) to display a lightbox gallery. We need to reuse the function in several places, so we call it using a data attribute on the DOM elements (data-gallery). This element, in addition to triggering the function, contains all the information needed to add the images to an array that is then used in the plugin call. So far everything seems to be fine, but when it comes to using the array in the plugin code, something goes wrong. If the same array is copied and pasted manually into a variable, then it works. The job is to fix the bug (whatever it is), optimize the code as much as possible and make it work. For those who know how to do it, I don't think it is even necessary to share the files, directly with the function you should be able to correct it. Please, if you don't see the bug directly in the code, don't send a bid. Thank you. //CODE var initGallery = function () { $("[data-gallery]").each(function () { var $this = $(this), destination = $[login to view URL]("id"), order = $[login to view URL]("order") + "_", count = $[login to view URL]("count"), continent = $(".section-cabecera").data("continent") + "/", folder = "/Content/img/destinations/", path = folder + continent + order + destination + "/" + destination + "_"; var pictures = []; for (var i = 1, limit = count + 1; i < limit; i++) { [login to view URL](" {src: '" + path + i + ".jpg' }"); } /* Just to check that the array is correct */ [login to view URL](pictures); /* This returns manualArray as text */ var array = [login to view URL]([login to view URL]()), formatedArray = "[" + [login to view URL]().replace('"', '').replace('"', '') + "]"; /* Pass the array to string just to create a manual variable and test it */ $("#result").html(formatedArray); /* This Works. Is just the previous text copied and pasted */ var manualArray = [ { src: '/Content/img/destinations/africa/04_namibia/[login to view URL]' }, { src: '/Content/img/destinations/africa/04_namibia/[login to view URL]' }, { src: '/Content/img/destinations/africa/04_namibia/[login to view URL]' }, { src: '/Content/img/destinations/africa/04_namibia/[login to view URL]' }, { src: '/Content/img/destinations/africa/04_namibia/[login to view URL]' }, { src: '/Content/img/destinations/africa/04_namibia/[login to view URL]' }, { src: '/Content/img/destinations/africa/04_namibia/[login to view URL]' }, { src: '/Content/img/destinations/africa/04_namibia/[login to view URL]' } ] /* LightGallery Plugin */ var gallery = lightGallery($this, { dynamic: true, mode: "lg-zoom-out", loop: false, download: false, plugins: [lgAutoplay, lgFullscreen], dynamicEl: pictures }); [login to view URL](destination).addEventListener("click", function () { [login to view URL](); }); }); }
ID Proyek: 35079739

Tentang proyek

9 proposal
Proyek remot
Aktif 1 tahun yang lalu

Ingin menghasilkan uang?

Keuntungan menawar di Freelancer

Tentukan anggaran dan garis waktu Anda
Dapatkan bayaran atas pekerjaan Anda
Uraikan proposal Anda
Gratis mendaftar dan menawar pekerjaan
Diberikan kepada:
Avatar Pengguna
Hi, Hope you are doing great!. I can fix the issue right now . Looking forward to your positive response. Best Regards, Ijaz Hussain
€25 EUR dalam 1 hari
5,0 (27 ulasan)
6,7
6,7
9 freelancer menawar dengan rata-rata €23 EUR untuk pekerjaan ini
Avatar Pengguna
The issue is with how the data is being parsed please give me the html also and I can fix it within an hour
€30 EUR dalam 7 hari
4,6 (7 ulasan)
6,9
6,9
Avatar Pengguna
Hii, How are you?? I am neha , checked your requirements and understood complete scope of the work and you looking out someone can understand and fix bug and resolve issue so share me credential with an opportunity to start work together .. Sure i will deliver you quality work ... Ping me ! Thanks
€15 EUR dalam 2 hari
3,7 (98 ulasan)
5,6
5,6
Avatar Pengguna
Hello I have 6+ years of experience in Web design and developments. NOTE: I believe communication is the key to unlocking any successful outcome. lets discuss the project in detail. Once done, I will tell you the time estimation based on the exact requirements. I'm looking forward to hearing back from you. Regards Parth Mangukiya
€20 EUR dalam 1 hari
4,9 (38 ulasan)
4,3
4,3
Avatar Pengguna
Hello. I understand your project requirements completely and feel confident to deliver the job perfectly. Your job really caught me eyes because my experience and expertise are perfect match for your job. I have 5+ years of rich and strong experience about JavaScript and HTML5. I you work with me, you will get what you want. Client's satisfaction is my goal and will continue to work until I give you 100 % results. And from product distribution to maintenance, I will always strive to provide the best service to our customers and will stick to the contract. Looking forward to your response. Thank you.
€14 EUR dalam 7 hari
4,2 (19 ulasan)
4,7
4,7
Avatar Pengguna
⭐Thank you for reaching my proposal!⭐ I've read your requirement carefully and understood all. I am a full stack developer(7 years experiences). I am ready to discuss your project and can start immediately. I am looking forward to working with you. ⭐Best Regards⭐
€20 EUR dalam 1 hari
4,7 (7 ulasan)
3,8
3,8
Avatar Pengguna
Hello, This task match with my working skills however i have some points to discuss . - I would greatly appreciate the opportunity to be working with you and to discuss my qualifications and your requirements in detail.
€50 EUR dalam 7 hari
5,0 (15 ulasan)
3,7
3,7
Avatar Pengguna
hi, im expert in javascript nad bug fixing. i love challenge. may i see this websites to see the browser log for error code
€14 EUR dalam 7 hari
5,0 (1 ulasan)
1,3
1,3

Tentang klien

Bendera SPAIN
Madrid, Spain
5,0
27
Memverifikasi Metode pembayaran
Anggota sejak Jul 5, 2016

Verifikasi Klien

Terima kasih! Kami telah mengirim Anda email untuk mengklaim kredit gratis Anda.
Anda sesuatu yang salah saat mengirimkan Anda email. Silakan coba lagi.
Pengguna Terdaftar Total Pekerjaan Terpasang
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuat pratinjau
Izin diberikan untuk Geolokasi.
Sesi login Anda telah kedaluwarsa dan Anda sudah keluar. Silakan login kembali.