Find Jobs
Hire Freelancers

Adding a reload condition in a javascript function when blurb activated

€8-30 EUR

Completed
Posted over 3 years ago

€8-30 EUR

Paid on delivery
Hi Everyone, In my website and on this page: [login to view URL] i got the following organization: - a menu composed of blurbs. When one is activated, the other one are disable. - module displayed for each blurb. Each module displays a grid representation of the articles in my blog. And all the articles displayed have the same height. Current trouble: if you click on a blurb my function to uniformize the height is not working properly because it's not reloaded. Please, have a try to understand the issue. So, for this project, no need website access but just to tell me or change my code to make it working. Code for the activation of the blurb: <script> jQuery(document).ready(function($) { $('.tab-title').each(function () { var section_id = $(this).find("a").attr("href"); $(this).find("a").removeAttr("href"); $(this).click(function() { $(this).siblings().removeClass("active-tab"); $(this).addClass("active-tab"); $('.tab-content').hide(); $(section_id).show(); }); }); });</script> Code to equalize the height of the articles displayed: <script> (function ($) { $(document).ready(function () { $( window ).resize(function() { $(".displayarticles").each(function(){ equalise_articles($(this)); }); }); $(".displayarticles").each(function(){ var blog = $(this); equalise_articles($(this)); var observer = new MutationObserver(function (mutations) { equalise_articles(blog); }); var config = { subtree: true, childList: true }; [login to view URL](blog[0], config); }); function equalise_articles(blog){ var articles = [login to view URL]("article"); var heights = []; [login to view URL](function(){ var height = 0; //height += $(this).outerHeight() - $(this).height(); height += $(this).find(".et_pb_image_container").outerHeight(true); height += $(this).find(".entry-title").outerHeight(true); height += $(this).find(".post-meta").outerHeight(true); height += $(this).find(".post-content").outerHeight(true); [login to view URL](height); }); var max_height = [login to view URL](Math,heights); [login to view URL](function(){ $(this).height(max_height); }); } $(document).ajaxComplete(function(){ $(".displayarticles").imagesLoaded().then(function(){ [login to view URL]("images loaded"); $(".displayarticles").each(function(){ equalise_articles($(this)); }); }); }); $.[login to view URL] = function () { var $imgs = [login to view URL]('img[src!=""]'); if (!$[login to view URL]) {return $.Deferred().resolve().promise();} var dfds = []; $[login to view URL](function(){ var dfd = $.Deferred(); [login to view URL](dfd); var img = new Image(); [login to view URL] = function(){[login to view URL]();} [login to view URL] = function(){[login to view URL]();} [login to view URL] = [login to view URL]; }); return $.[login to view URL]($,dfds); } }); })(jQuery); </script> In this 2nd code, i think we should add a reload condition to resize well the articles...but i don't find how to do so. In advance, thank you!
Project ID: 26815689

About the project

7 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello, Thanks for the invite do you want me to just modify the code that work's or need that actually fixed on the site? I guess access details still working? Will check this soon and update by tomorrow. Regards, Ismail.
€30 EUR in 7 days
4.9 (9 reviews)
3.4
3.4
7 freelancers are bidding on average €24 EUR for this job
User Avatar
Hello there. Nice to meet you. Could you send all details? I am experienced in PHP, JavaScript (full stack). I have a lot of experience in Javascript, jQuery, HTML5, CSS, Joomla, Prestashop, Opencart, Drupal, React.js,  React Native, mobile development ect. Thank you. I hope to hear from you
€20 EUR in 7 days
5.0 (51 reviews)
6.6
6.6
User Avatar
Salut! The requested code modification is ready and I can forward it as soon as you move forward with the project. Bien Cordialement, Dobri
€15 EUR in 0 day
4.9 (189 reviews)
6.2
6.2
User Avatar
I can complete your project on time and within your budget. I have worked on similar projects to what you are looking for, and I am confident I can exceed your expectations. I would love to work on your project. I view the job details extremely carefully and I am absolutely sure that I can do the project very well.
€25 EUR in 1 day
5.0 (37 reviews)
4.9
4.9

About the client

Flag of FRANCE
Thonon-les-bains, France
5.0
12
Payment method verified
Member since Nov 27, 2019

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.