deepson2 Posted May 20, 2009 Share Posted May 20, 2009 Hello, I am using jcarousel slider to show my selection query with my php scripts. an its working for me. but if i put this query into if condition(its necessary for me because i am checking one condition using this) why Jquery is not working in if condition? can anyone please help me? here is my code PHP Code: <ul id="mycarousel" class="jcarousel-skin-tango"> <? if($userid == $blogdata->author){ echo "SELECT a.username,a.avatar,r.visitor_id,r.visiting_count,TIMESTAMPDIFF(MINUTE, r.recent_visited, NOW()) AS MinsSinceLastVisit FROM recent_visitor as r ,author as a WHERE (r.visitor_id = a.id) AND r.profile_owner = '$blogdata->author' ORDER BY r.recent_visited DESC "; $sqlpage = $op->runsql("SELECT a.username,a.avatar,r.visitor_id,r.visiting_count,TIMESTAMPDIFF(MINUTE, r.recent_visited, NOW()) AS MinsSinceLastVisit FROM recent_visitor as r ,author as a WHERE (r.visitor_id = a.id) AND r.profile_owner = '$userid' ORDER BY r.recent_visited DESC "); if(mysql_num_rows($sqlpage) > 0){ while($row1 = $op->select($sqlpage)){ $imagearr = explode(",",$row1['avatar']); $imagearr[0]= preg_replace("/\/avatar\//","/small/", $imagearr[0]); ?> <li><a href='/profile/<?=$blog->spacereplace($row1['username']);?>/' title="<?=$row1['username']?>"><img src="<?=$retpath;?>/<?=$imagearr[0];?>" width="60" height="60" alt=""/></a></li> <? }}?> </ul> </form> <br class="clear" /> <?} ?> thanks in advance Link to comment https://forums.phpfreaks.com/topic/158867-jquery-and-if-condition/ Share on other sites More sharing options...
trq Posted May 20, 2009 Share Posted May 20, 2009 Sounds more like a php question to me, especially since you have'nt posted any javascript. Link to comment https://forums.phpfreaks.com/topic/158867-jquery-and-if-condition/#findComment-837931 Share on other sites More sharing options...
deepson2 Posted May 20, 2009 Author Share Posted May 20, 2009 <link href="../style.css" rel="stylesheet" type="text/css" /> <!-- jQuery library --> <script type="text/javascript" src="lib/jquery-1.2.3.pack.js"></script> <!-- jCarousel library --> <script type="text/javascript" src="lib/jquery.jcarousel.pack.js"></script> <!-- jCarousel core stylesheet --> <link rel="stylesheet" type="text/css" href="lib/jquery.jcarousel.css" /> <!-- jCarousel skin stylesheet --> <link rel="stylesheet" type="text/css" href="skins/tango/skin.css" /> <style type="text/css"> /** * Overwrite for having a carousel with dynamic width. */ .jcarousel-skin-tango .jcarousel-container-horizontal { width: 100%; } .jcarousel-skin-tango .jcarousel-clip-horizontal { width: 100%; } </style> <script type="text/javascript"> jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel({ visible: 3 }); }); this is my java scripts code. please help me. Link to comment https://forums.phpfreaks.com/topic/158867-jquery-and-if-condition/#findComment-837934 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.