module_developer Posted May 31, 2013 Share Posted May 31, 2013 Hi, I was doing a slider module . I have taken fancytransection as slider. In the slider as per documentation I am using all these values to show slider effect: '', // wave, zipper, curtain width: 500, // width of panel height: 332, // height of panel strips: 20, // number of strips delay: 5000, // delay between images in ms stripDelay: 50, // delay beetwen strips in ms titleOpacity: 0.7, // opacity of title titleSpeed: 1000, // speed of title appereance in ms position: 'alternate', // top, bottom, alternate, curtain direction: 'fountainAlternate', // left, right, alternate, random, fountain, fountainAlternate navigation: false, // prev and next navigation buttons links: false // show images as links Here I am fetching the value of width,height and navigation from the database. So that one can manually set values for all this. This is working for width and hight that I am getting from the database. But the value for navigation which I am getting either true or false from the database is not working. Everytime it is showing the slider navigation. Here is the codes that have been used in my .tpl file <script> var result_navigation="{$result_navigation}"; var result_width="{$result_width}"; var result_height="{$result_height}"; $.fn.jqFancyTransitions.defaults = { width: result_width, // width of panel height: result_height, // height of panel strips: 10, // number of strips delay: 5000, // delay between images in ms stripDelay: 50, // delay beetwen strips in ms titleOpacity: 0.7, // opacity of title titleSpeed: 1000, // speed of title appereance in ms position: 'alternate', // top, bottom, alternate, curtain direction: 'fountainAlternate', // left, right, alternate, random, fountain, fountainAlternate effect: '', // curtain, zipper, wave navigation: result_navigation, // prev next and buttons links : true // show images as links }; </script> Here the value for width as result_width and height as result_height has been working fine. But the value for result_navigation is fetching fine with false or true value. But when I am using that in the code its not working. It is showing the navigation just like the value is true. value for false is not working here. Can someone kindly tell me how to solve this issue? Any help and suggestions will be really appreciable. Thanks Link to comment Share on other sites More sharing options...
vekia Posted May 31, 2013 Share Posted May 31, 2013 what you exactly have got in the {$result_navigation} variable? Link to comment Share on other sites More sharing options...
module_developer Posted May 31, 2013 Author Share Posted May 31, 2013 what you exactly have got in the {$result_navigation} variable? Thanks @vekia for the reply. Yes I am getting true and false for the variable. Link to comment Share on other sites More sharing options...
vekia Posted May 31, 2013 Share Posted May 31, 2013 but true / false as a boolean or true / false as a varchar? Link to comment Share on other sites More sharing options...
module_developer Posted June 1, 2013 Author Share Posted June 1, 2013 but true / false as a boolean or true / false as a varchar? I am getting the value as varchar... Link to comment Share on other sites More sharing options...
vekia Posted June 1, 2013 Share Posted June 1, 2013 so it's okay :/ i just thought that you use it as boolean. i've got idea. check: this is working code: navigation: false, // prev and next navigation buttons and this is yours: var result_navigation="{$result_navigation}"; navigation: result_navigation, // prev next and buttons you use navigation: "false" instead the navigation: false maybe the value of navigation variable have to be a bool? (not string) 1 Link to comment Share on other sites More sharing options...
module_developer Posted June 1, 2013 Author Share Posted June 1, 2013 (edited) so it's okay :/ i just thought that you use it as boolean. i've got idea. check: this is working code: navigation: false, // prev and next navigation buttons and this is yours: var result_navigation="{$result_navigation}"; navigation: result_navigation, // prev next and buttons you use navigation: "false" instead the navigation: false maybe the value of navigation variable have to be a bool? (not string) @vekia thanks for the reply.. Yes I just made change to the codes and I used bool instead of varchar . Then in .tpl file I just used this var result_navigation= {if $result_navigation == 1 }true{else}false{/if}; and used that variable inside the jQuery and it worked fine. Really thanks for the help... Edited June 1, 2013 by module_developer (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 1, 2013 Share Posted June 1, 2013 You're welcome btw. this module will be available for free ? if so, dont forget to share it in free modules section i marked thread as solved regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now