Topic: MDB Bootstrap Support

TeddyS31 pro asked 5 years ago


*note* install and enable CORS sharing chrome or firefox extension for snippet in order for posts to show up. blog posts are coming from a WordPress blog and CORS does not allow access to local development without this plugin. 

Code Snippet

When you click on the snippet above, you will see that I have a custom RSS feed that is supposed to be creating new elements/posts in the carousel. Unfortunately, it disappears when it goes to the next item carousel. This is not 100% yet but there are ten posts that should be displaying and I am not sure as to why. The JS code below is in the snippet and I combined it with the RSS but it's the same initialization as in the documentation. 

**update, I am creating the div element and inserting it into the correct parent div, that may be the issue of why it's not recognizing. **


$('.carousel.carousel-multi-item.v-2 .carousel-item').each(function(){
var next = $(this).next();
if (!next.length) {
next = $(this).siblings(':first');
}
next.children(':first-child').clone().appendTo($(this));

for (var i=0;i<3;i++) {
next=next.next();
if (!next.length) {
next = $(this).siblings(':first');
}
next.children(':first-child').clone().appendTo($(this));
}
});

TeddyS31 pro commented 5 years ago

Ended up being a DOM manipulation issue and not injecting the created html into the right parent node. RESOLVED! 


Mikołaj Smoleński staff answered 5 years ago


Hi there,

First of all please take a look at console in Your snippet. The request 'https://primetrust.com/blog/feed/' is blocked due to CORS policy. Please try to update Your snippet as it will work without errors.

Best regards


TeddyS31 pro commented 5 years ago

I apologize, I am actually using a CORS chrome extension that's allowing me to bypass this through development. I do not have access to the blog to add that functionality, but the code snippet should still work though?


TeddyS31 pro commented 5 years ago

The original issue remains the same however in regards to the javscript breaking for no reason and there are no errors in log, aside from the CORS policy error due to the wordpress blog. this also will be resolved once we put the site up on the domain but for local development reasons, I am using the chrome extension. 


Mikołaj Smoleński staff commented 5 years ago

I understand but for this moment I'm unable to resolve Your issue due to content blocking. 

Best regards



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.15
  • Device: Macbook Pro 13
  • Browser: Chrome
  • OS: Mac OS Mojave
  • Provided sample code: Yes
  • Provided link: Yes