OrdaSoft forum
Welcome, Guest
Please Login or Register.    Lost Password?
mod_remslideshow show if ($(window).width() (0 viewing) 

Joomla Real Estate

Go to bottom Favoured: 0

Mod_remslideshow show if ($(window).width()

sliwamaster (User)
Junior Boarder
Posts: 30
graphgraph
User Offline Click here to see the profile of this user
Re:mod_remslideshow show if ($(window).width() 8 Years, 8 Months ago
Karma: 0  
Of course I will

I have a question is it possible to make simple remake of touch slider to be more functionally on mobiles?


I have an idea but I need a little help

I think the way to do it is:
mod_realestate_os_featuredslider.php
change this code to a code which one is getting 'type' from .js file
Code:

$show_type =$params->get('type','horizontal');


And add script in jquery like:
Code:

if ($(window).width() < 960) {
 $show_type = vertical
}
else {
  $show_type = horizontal
}



I think I have a problem with getting variable from .js file to .php file
Logged Logged
Last Edit: 2016/03/04 14:30 By sliwamaster.
The administrator has disabled public write access.
admin (Admin)
Admin
Posts: 8356
graph
User Offline Click here to see the profile of this user
Re:mod_remslideshow show if ($(window).width() 8 Years, 8 Months ago
Karma: 102  
You may add that to {your site}modules/mod_realestate_os_featuredslider/tmpl/default.php

to
jQuery(window).resize(function() {

if ( jQuery(window).width() < 960) {
show_type = 'vertical';
}
else {
show_type = 'horizontal';
}

}

But I afraid you will need every time recreate new Swiper slider object with "mode" or 'horizontal' or 'vertical'

also you will need move every PHP check $show_type to JavaScript.

Thanks
Logged Logged
The administrator has disabled public write access.
Go to top
»