Search the Community
Showing results for tags 'mobile'.
-
Right now I have a mobile dropdown that works fine. The only issue I have is that when viewing it on my smartphone, the dropdown gets cut off at the bottom and I am unable to scroll it down to rest of it. Is there a way to fix it so that It's scrollable? Here's my js code of the dropdown. $(document).ready(function() { $(".nav-mobile li a").each(function() { if ($(this).next().length > 0) { $(this).addClass("parent-arrow"); } }) $(".toggle-mobile-menu").click(function(e) { e.preventDefault(); $(this).toggleClass("active-mobile"); $(".nav-mobile").toggle(); }); adjustMenu(); }); $(window).bind('resize orientationchange', function() { ww = document.body.clientWidth; adjustMenu(); }); var adjustMenu = function() { var ww = document.body.clientWidth; if (ww <= 850) { $(".toggle-mobile-menu").css("display", "block"); if (!$(".toggle-mobile-menu").hasClass("active-mobile")) { $(".nav-mobile").hide(); } else { $(".nav-mobile").show(); } $(".nav-mobile li").unbind('mouseenter mouseleave'); $(".nav-mobile li a.parent-arrow").unbind('click').bind('click', function(e) { // must be attached to anchor element to prevent bubbling e.preventDefault(); $(this).parent("li").toggleClass("hover"); }); } else if (ww > 850) { $(".toggle-mobile-menu").css("display", "none"); $(".nav-mobile").hide(); $(".nav-mobile li").removeClass("hover"); $(".nav-mobile li a").unbind('click'); $(".nav-mobile li").unbind('mouseenter mouseleave').bind('mouseenter mouseleave', function() { // must be attached to li so that mouseleave is not triggered when hover over submenu $(this).toggleClass('hover'); }); } }
-
I have created a countdown clock that will be counting down from 100 (looping each second). This is the code: <script> $(document).ready(function(){ $("#buttonClick").on('click', function(){ var initialValue = $("#countdown").text(); setInterval(function () { initialValue--; $("#countdown").text(initialValue); }, 1000); }); }); </script> <body> <button id="buttonClick">Click Me</button> <div id="countdown">100</div> </body> When i click the "Click Me" button the number counts down from 100, 99, 98,97.... When try this from a mobile device and while the device is awake, it works just fine. Lets say the counter is on 50 and i press the power button of the mobile device and it sleeps. If i wake the mobile after 40 seconds, i will not see the remaining 10 seconds but something like 40 or 38 seconds. This happens every time and i don't know why. Can someone help? Regards, Christos
- 2 replies
-
- javascript
- html
-
(and 3 more)
Tagged with:
-
I have a php script that detects the user's mobile phone and browser and some other stuff. To display this info, I use: <?php echo htmlentities($_SERVER['HTTP_USER_AGENT']); ?> But this outputs a lot more than I need. It outputs the handset, the browser, the version etc... like this: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari/9537.53 Does anyone know what I need to change in the script just so I can have it display the handset name? All I want it to do is say something like "You have a Samsung Galaxy Note II" I have attached the mobile_detect script but I dont know what to edit because I don't really know php. Appreciate the help, JH Mobile_Detect.php.zip
-
We Have online shopping portal Named Oshopindia.com recently we created mobile website for oshopindia on products page we want to add pagination for products We impliment many code of pagination but it's not working properly in mobile website Can anybody Suggest me any simple pagination code for Mobile website
-
Hi ~ I am having problems with the below code switching our 11 different full-HTML themes to our one mobile theme. The code in black was what we had initially, and I added the code that I have bolded red. I'm guessing I probably just have stuff in the wrong order, because I am quite new to PHP, but not really sure. Any insight and assistance would be greatly appreciated. function settheme() { $theme = 'default'; $theme_param = getUrlParm('theme'); if ($theme_param) { $theme_param = strtolower($theme_param); } $theme_session = $this->CI->session->getSessionData('theme'); if ($theme_param) { $theme = $theme_param; } else { if ($theme_session) { $theme = $theme_session; } if (($theme = "euf/assets/themes/$theme") && array_key_exists($theme, $CI->themes->setTheme())) { setcookie('theme', $setTheme, 0, '/'); $CI->themes->setTheme($theme); } elseif (((strpos($_SERVER['HTTP_USER_AGENT'], 'iphone', 'Android', 'webOS', 'ipad', 'Blackberry') != false)) && ($theme = "euf/assets/themes/mobile") && array_key_exists($theme, $CI->themes->setTheme())) { $theme = "/euf/assets/themes/mobile"; $CI->themes->setTheme($theme); } elseif (($setTheme = $_COOKIE['theme']) && ($theme = "euf/assets/themes/$theme") && array_key_exists($theme, $CI->themes->setTheme())) { $theme = "/euf/assets/themes/$theme"; $CI->themes->setTheme($theme); } if ($theme !== $theme_session) { $this->CI->session->setSessionData(array('theme' => $theme)); } $CI =& get_instance(); if ($theme) { $theme = "/euf/assets/themes/$theme"; $CI->themes->setTheme($theme); } } }
-
Hi, Im having trouble uploading images from ANDOID,IOS device to a webserver using mobile browser. whenever i select images from the phone's gallery it refreshes the whole page which renders the whole action useless. can you help me with this? is there examples that i can test how this thing works? Any help is greatly appreciated. Thanks
-
Hello Everyone, On my website, users can upload their picture. I have one made in Flash, one with jquery and another with traditional form, The default page for uploading photo is the one made in Flash.... so the problem is some mobile device doesnt support flash... is there a way, in php to detect if the user is from mobile? So is the user is from mobile, i'll redirect to the good one.. Thanks
-
Hi all. I'm building a site (which you will be able to find here: http://www.xclo.mobi/xclo2) and have a list of categories on this site. Each category on that page is linked to an item In my Database. Which then displays more content once clicked. I have a separate database form within the same database called apps (instead of mobi). Inside this I have a list of apps available but some apps are for selected devices. For example some apps link to google play and can only be displayed on an android device as displaying these on another device (ios for example) can be seen as pointless. The same goes for displaying iPad apps on an iPhone and also on an android as these can be seen as pointless. The device is saved in my apps database under the field "device" and have one of these categories iPhone iPad or android, What I would like is to display a category on my index page along side my other ones which say "APP DOWNLOADS". And once clicked it only displays the relevant apps available just like my current promotions on my site. But I only want the link to appear if they are on one of these devices: iPod touch, iPhone, iPad mini, iPad, android as these are the only devices that I have content for at the moment. For example. If you are viewing on a blackberry or a windows 8 or even a Firefox phone then this category will not show up. Please can someone tell me how to do this? Thank you. My code for my index page is: <?PHP include_once('include/connection.php'); include_once('include/article.php'); $category = new category; $articles = $category->fetch_all(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Xclo.mobi</title> <link type="text/css" rel="stylesheet" href="other.css" /> <link rel="apple-touch-icon" href="homescreen.png" /> <link href="startup.png" rel="apple-touch-startup-image" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-34172259-1']); _gaq.push(['_setDomainName', 'xclo.co.uk']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body> <?php include_once('header.php'); ?> <div id="content"> <?php foreach ($articles as $article) { ?> <ul class="pageitem"><li class="button"> <a href="list.php?id=<?php echo $article['promo_cat']; ?>"> <input type="submit" name="Submit" value="<?php echo $article['promo_cat']; ?>"/> </a></li></ul> <?php } ?> </div> <br><center> <SCRIPT charset="utf-8" type="text/javascript" src="http://ws-eu.amazon-adsystem.com/widgets/q?rt=tf_sw&ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fxclo-21%2F8002%2Fc2cd2f40-ca29-49bc-add9-6cf16307e855"> </SCRIPT> <NOSCRIPT><A HREF="http://ws-eu.amazon-adsystem.com/widgets/q?rt=tf_sw&ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fxclo-21%2F8002%2Fc2cd2f40-ca29-49bc-add9-6cf16307e855&Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT></center> <?php include_once('footer.php'); ?> </body> </html> Please help. Thank you.
-
I was looking for a magento application for a ecommerce store and finally found a native application called Magento Android Application by Adodis at Android Market place. If you have any other application similar to this please let me know
-
My client has created a QR Code that goes to a specific page on a non-mobile site. The client does have a mobile site, m.customersdomain.com Question is, the QR Code has already been submitted to print for advertising and is going to a regular URL. Is there a way to look for mobile devices that hit this one non-mobile page and redirect them to a specific mobile URL / page? Would this be something in .htaccess file? Basically, I'm looking @ 2 questions: 1. Are you hitting a specific URL (already embedded in the QR Code)? 2. Are you a mobile device? If both are yes >> go to this mobile page
-
How to add country code if user doesn't enter the country code when they register? If user did enter the country code it will skip and store it into database, if user doesn't enter then system will add the country code and store to database. How can I do that?
- 2 replies
-
- country-code
- validation
-
(and 1 more)
Tagged with:
-
Hello all, I'm thinking about updating a website and using PHP to cater to all the types of users (e.g. => LT/DT/Mobile Devices, etc...). The best adaptation I've seen to mobile that promotes visibility is what GoDaddy has done. There is a big difference between their homepage and their mobile equivalent. Here they are: https://www.godaddy.com/ http://www.godaddymobile.com/ Does anyone here have any links to some good resources I can use to try and get the same kind of setup going with PHP or any of the frameworks that have been built with it? I've never used frameworks like Zend or any of the CMS platforms that are out there like Wordpress. Any advice on what is the best option here? It looks like what GoDaddy has done is basically redirected users appropriately and used 2 completely separate domains to cater to as many people as they can. Does it seem like that to anyone else too? thanks.
-
When trying to view our website from a mobile phone or an iPad, it redirects to another website which does not exist. I can see where the redirection is taking place in the index.php file, but I do not know what I need to remove in order for the redirect to stop. From a mobile device or iPad it should just go to our normal website, www.u-a-s.com, we do not have a mobile version as of yet. I tried a few things, but do not know enough to know what to take out. Can anyone help? Here is the code: ************************ $ua = $_SERVER['HTTP_USER_AGENT']; if ( stristr($ua, "Windows CE") or stristr($ua, "AvantGo") or stristr($ua,"Mazingo") or stristr($ua, "Mobile") or stristr($ua, "T68") or stristr($ua,"Syncalot") or stristr($ua, "Blazer") ) { $DEVICE_TYPE = "MOBILE"; } if (isset($DEVICE_TYPE) and $DEVICE_TYPE=="MOBILE") { header ("Location:http://lahori.org/mydev/universal/mobile/"); exit; } define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ require('./wp-blog-header.php'); ?>
- 14 replies
-
- mobile
- redirection
-
(and 1 more)
Tagged with:
-
Hello All, I am having some trouble with my mobile stylesheets. They aren't loading when I look at my site on mobile devices. This is what I have now. <link rel="stylesheet" type="text/css" href="../css/master.css" media="screen"/> <link rel="stylesheet" type="text/css" href="../css/article.css" media="screen"/> <link rel="stylesheet" type="text/css" href="../css/mod.css" media="screen"/> <link rel="stylesheet" href="../css/mobile.css" media="only screen and (max-device width:480px)"/> The mobile stylesheet pretty much says to hide the right floating column and give the content a 100% width and the wrapper a 90% width. I am not really familiar with @media or @import. What do I need to do??
- 3 replies
-
- mobile
- not working
-
(and 2 more)
Tagged with:
-
I searched, and there isn't much and nothing really current. Is there a code that I could use to hide specific content based on what device my User is using? Specifically, if the the User is using a mobile phone browser. Something along the lines of: if ( !is_mobile( ) ) { } I've tried this, but it didn't work.
-
I am finishing up a mobile version of my web site and have run into a bit of a snag with the redirect. I have a test page that i can visit with my phone and it will send me to the mobile version of the site no problem, but only the home page. What I am looking for is if someone comes to my site from google, or any othere site, and is using a mobile device it will redirect them to the same page on the mobile site. So if you come to the page drinktothecredits.com/movies and you are using a phone it will send you to mobi.drinktothecredits.com/movies. I also want tablets it use the full site. I know that I need to be able to some how send the url to the mobile site but I am unsure how to do this. Thank you Here is what I have so far. <?php $useragent=$_SERVER['HTTP_USER_AGENT']; if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i',substr($useragent,0,4))) header('Location: http://mobi.drinktothecredits.com/'); ?>