We need the same with in all item to a different .

More
11 years 9 months ago #27603 by erick_virgilio
We want to give the same responsive effect to a different component of com_content that is there by default. In this new component we have inserted <div class="dynlayout_container"> and it works fine within the component but we need that each items width is specifically 200PX and not what is predefined by its original image width, in order to do that we introduced :

<div class="item ">
<div class="dynlayout_wide1">

This generates a defined width of 200PX because of the file´s configuration dynlayouy.js, this only applies to the first generated items but when we scroll down (indefinitely) the new items that are generated have also <div class="dynlayout_wide1"> within its code, the problem is that the items are generated with their original width and not the one that we are predefining.


TO sum things up, our component code looks like this:

<div class="dynlayout_container">
<div class="item ">
<div class="dynlayout_wide1">
</div>
</div>
</div>


And we need that all out items have the same width of 200PX.

You can see how this is applied in the following link: dametv.tv/responsive25/index.php/media-gallery

Please Log in to join the conversation.

More
11 years 9 months ago #27615 by ivan.milic
The scrip it broken in dynlayout.js and content area is empty.

Someone edit it and forgot some 'x' character in middle of code.


function dynlayout_prepare_items(){

var tW = jQuery.mobile.activePage.find('.dynlayout_container').parent().innerWidth();
var tCols = Math.round(tW / dynlayout_config.box_width_unit);
var cWidth = tW;
if(tCols > 0)
cWidth = Math.floor(tW/tCols);
x
Uncaught ReferenceError: x is not defined
jQuery.mobile.activePag

Please Log in to join the conversation.

More
11 years 9 months ago #27656 by erick_virgilio
Thanks I removed this 'x', this was a error but really I don't change nothing in the code, now I replaced the original dynlayout.js and I have the same problem, the first item are with widh 200px and the next item have the original image size.

I try to change style="width:200px!important;min-height:320px!important;" but when the js try to resize the internal div have a big with that externel div, has a bad effect.

I think the solution is in the dynlayout.js, but not how it works and where to correct this

Please Log in to join the conversation.

More
11 years 9 months ago #27663 by ivan.milic
Well you but that would require significant changes, you can not fix width because with is sightly increased or decreased to fill whole space. try this but I dough it will work , around line 270:
Code:
jQuery(this).masonry({ // options itemSelector : '.item, .itemContainer, .userItemView, .tagItemView, .dynlayout_feed > LI', columnWidth : function(){ var W = jQuery.mobile.activePage.find('.dynlayout_container').parent().innerWidth(); var cols = Math.round(W / dynlayout_config.box_width_unit); var cWidth = W; if(cols > 0) cWidth = Math.floor(W/cols); return cWidth; },

change to just:
Code:
jQuery(this).masonry({ // options itemSelector : '.item, .itemContainer, .userItemView, .tagItemView, .dynlayout_feed > LI', columnWidth : function(){ return 200; },

Please Log in to join the conversation.

Time to create page: 0.165 seconds
Powered by Kunena Forum