dgnzcn Posted May 24, 2014 Share Posted May 24, 2014 (edited) hi, i combined two js code in one, gradient slider wroking and changed codes in text area. this is ok. but gradient colors can not displaying in textarea and also horizontal and vertical menu can not changing colors and codes. what is my wrong ? <div class="export"> <textarea name="baslikrengi_<?php echo $cnt1; ?>" cols="32" class="export" id="baslikrengi_<?php echo $cnt1; ?>"><?php echo KT_escapeAttribute($row_rskayan_icerikler['baslikrengi']); ?></textarea></div> <select id="orientation" onchange="changeOrientation();"> <option value="horizontal">Horizontal</option> <option value="vertical" selected="selected">Vertical</option> </select> <div class="gradient3"></div> <script> $(document).ready(function(){ $('.gradient3').ClassyGradient({ gradient: '#00ffff 0%,#008900 30%,#f00044 70%,#0042d2 100%', onChange: function(stringGradient,cssGradient) { $('.export').val(cssGradient); } }); }); $(document).ready(function() { $('.gradient3').ClassyGradient({ gradient: '#ebf1f6 0%,#ff9cff 40%,#ff6aff 61%,#ff2db7 100%', target: '.export' }); }); function changeOrientation() { var orientation = $('#orientation :selected').val(); $('.gradient3').data('ClassyGradient').setOrientation(orientation); } </script <script> $(document).ready(function() { $('.gradient').ClassyGradient(); }); </script> Edited May 24, 2014 by dgnzcn Quote Link to comment https://forums.phpfreaks.com/topic/288734-js-code-problem/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.