Activating rear Android camera
Hi I use the code below to activate the camera and scan qr codes! n.webkitGetUserMedia({video: true, audio: false}, success, error); But when I try to force using the rear camera, it fails (it doesn't activate the camera at all): n.webkitGetUserMedia({video: { mandatory: { facingMode: "environment" } }, audio: false}, success, error); How can I force using the rear camera? Thanks
Match media queries
I'm a beginner and trying to make a submenu animate in different ways depending on media queries. It should slide out from left (more than 768px width of a browser) and slide down in mobile mode. How can I match media queries from css? This code won't trigger if resizing. $(window).on('resize',function() { if ($(window).width() > 768 { $('ul#main-menu li').mouseenter(function () { $('ul.sub-menu', this).stop().delay(300).fadeIn(150); }).mouseleave(function () {
The code isn't working in firefox, works great with other browsers
Firebug gives me a warning "This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1." but I don't think that's the problem Do you have any thought how to help? <script type = "text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type = "text/javascript"> { var Fname = document.getElementsByName('FirstName')[0];
jquery dialog cropping my OK button
Hello, I'm trying to create a simple jquery dialog and it's cropping my OK button. Please see the attached image as an example: You will see that the left side of the OK button is cropped by 1 or 2 pixels. This only happens in Chrome. Here is my code for setting up the dialog: showInfoDialog: function (errorMessage, title, okCallback, cancelCallback, okButtonText, cancelButtonText) { var body = $("<body>"); var infoDialog = $("<div id='infoDialog' class='ahsDlg' style='height: auto'></div>").appendTo(body);
Addclass to id problem
I've got a problem using addclass/removeclass to id. It just won't work, take a look at this demo: https://jsfiddle.net/fu66rvdq/ This is working if I change id to class instead: https://jsfiddle.net/fu66rvdq/1/ What's going on?
Problem with adding hide/show text to cms
Hi I'm very new to Jquery and am trying to add a jquery effect hide and show to my web page where I have a lot of text. This is the code: <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script> $(document).ready(function(){ $("#hide").click(function(){ $("p").hide(); }); $("#show").click(function(){ $("p").show(); }); }); </script> </head> <body> <p>If you click on the "Hide" button, I will disappear.</p>
Select next span by class name in a table
Hi, by clicking on a span i want to select next span somewhere in a table. My example: <table class="month_table" cellspacing="0" cellpadding="0" border="0" > <tr > <td class="day" > <span class="span_day" > 1</span> </td> <td class="day" > <span class="span_day"> 2</span> </td> <td class="day" > <span class="span_day" > 3</span> </td> </tr> <tr > <td class="day" > <span
Code doesn't work correctly, need help to debug, please
Hey guys, I've been struggling with this small code. Can someone help me debug the issue of the Click on English. It works correctly once and afterwards just hides the div.... Here's the demo: http://codepen.io/epiblue/pen/NGBrMp?editors=101 Thank you guys, Any help is really appreciated
jQuery width fail
If we toggle all 3 div the last bouncing Also, for the same reason, if we set all 3 div width self width, the last element go to the next line. See this code for demonstration. I thing, this is because the .width function rounds to integer the width.
Testing for a class
Hi everyone, So I'm currently using Basic jQuery Slider(http://www.basic-slider.com/) in a webpage(www.posturemedic.ca). What I'm trying to do is on hover the first slide would for stop for 90 secs and then continue with the slide animation. The rest of the slides would stop for only a few secs and then continue with the slide animation. I was able to stop on hover for 90 seconds by adding setTimeout and the custom function fun. setTimeout delays the animation for 90 seconds, and then runs the fun
jQuery trigger range input field on focusin/focusout
I am trying to catch the focusin and focusout events in a range input field type. In Firefox 41, Chrome 46, IE 11 and Opera 33 it is working (it is sent to console in and out respectively) but not in Safari 5 and Mac OS X 10.9 with Safari 7. Am I missing something? HTML <input id="slider" type="range" min="100" max="500" step="10" /> Script $ ( 'input[type="range"]' ). on ( "focusin" , function (){ console . log ( 'in' ); }). on ( "focusout" , function (){ console . log ( 'out' ); });
Copy a Text, the popup will be removed automtically
Goal: When you copy a text by using CRL-C, the popup message should be removed. Today,this functionality is implemented at Visual Studio Online. Question: Do you know where I can find this functionality as a open source or similar? Thanks!
Script doesn't work on the 2nd click.
Hello, I'm working on this script: http://codepen.io/epiblue/pen/BowQpr But when implemented on eBay it gives me problems (click on the Flags few times). http://www.ebay.de/itm/Reloj-Tous-Motif-Rose-500350100-Nueva-Coleccion-Envio-24h-Gratis-/371453551263?hash=item567c5b629f The issue is that for some reason on eBay the Target attribute is beeing changed from my attribute to "_bank" and this is why the div's are left hidden. Any ideas how to solve this? Thanks
Div tag not showing data without an alert - Please help
Hi I cannot display data in a div from external files using jquery without an alert. Can anyone help me? <!DOCTYPE html> <html> <head> <title>Open external file using jQuery</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> <script> $(document).ready(function() { $("#readFile").click(function() { var mVersion = 107; var mLatestVersion = 111; var mHTMLContent = ""; var
Post data json inside checkbox and images
Hi this is my whole js, i'm building some edit products which is inside modal bootsrap $('.edit_button').on("click", function(e) { var id = $(this).data('id'); $.ajax({ url: base_url + "product/edit/"+id, type: "GET", dataType: "JSON", success: function(data) { //i need to show data from database in checkbox and images in by name input type checkbox $('[name="id_brand"]').val(data.id_brand); $('[name="merk"]').val(data.name_brand);
stopPropagation won't work
Hey there, i found topics on this matter before but nothing seems to do the trick with my problem. It's acually quite simple. I have a table. By clicking on the row i want this to fire $('.nextStatusActivator').on('click', function(evt){ var className = $(this).attr(classNamePrefixType); if($(this).attr('ctoggled')=="false"){ $(this).attr('ctoggled',true); var thisLevel = $(this).attr(classNameTypeLevel); var selection = $(this).siblings('['+classNamePrefixType+'*="'+className+'"]['+classNameTypeLevel+'="'+(parseInt(thisLevel)+1)+'"]');
return from function will not work - TypeError: myArray is undefined
Going nuts!!! Can't seem to get the function to return values properly. I've been messing with this for hours and can't work it out, Please help. I don't seem to be able to see the forest for the trees! Here is my code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Google Maps API getting Lat and Long with Geocoding</title> <script src="http://code.jquery.com/jquery-2.1.4.min.js"></script> <script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
why sign in is NOT failing?!
Hi, I am using simple sign in form with Jquery and PHP but my problem that everytime I enter anything in the email and password it accepts even if does not exist! below my jquery and PHP as well and the url is: http://order.smashburgerbahrain.com My Page: <!DOCTYPE html> <html manifest="cache.manifest"> <head> <meta charset="UTF-8"> <title>Welcome to Smashburger</title> <?php include './includes/meta.php'; ?> <link rel="stylesheet" href="css/signin.css"> </head> <body style="background:
How to Refresh DIV content
Hi, I am using below code to popupate data from MySQL into a DIV and I have btnAddToBasket to dynamicly add items to basket OnClick. After adding, I want to refresh the content of the DIV below using jquery to recall the latest basket items. How can I do this please? Thanks, Jassim Rahma <div id="divBasket" style="background-color: #FFFFFF; margin-top: 50px; margin-right: 120px; border: 1px solid; border-radius: 25px; padding: 10px; width: 300px; float: right;"> <table width="100%" cellspacing="10">
Why it's only happening at first execution
Hi, I have loading image for my add to basket button and for my order now button as well. When the users clicks on Add to basket button the loading image of the button will show properly but the loading image of the order now button will only show at the first time so if you refresh the page then click add to baster the loading image for the basket order now will show but click again add to basket and it won't show! here is my url: http://order.smashburgerbahrain.com/menu.php Thanks, Jassim Rahma
jQuery date pickeer is not working
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Datepicker - Default functionality</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> <script> $(function() { $( "#datepicker" ).datepicker(); }); </script> </head> <body> <p>Date: <input type="text"
How to use Dynamic Button
Hi, I am using below code to populate from database into my website. I want to know how can I now make a click for btnAddToBasket to pass the item_id in order to add the item to the basket? shall I add it in the data-id of the image? and if yes then how I pass that to the $('#btnAddToBasket').click? but if no then what's the best practice for this scenario? Thanks, Jassim <table width="750" cellspacing="10"> <?php $mysql_query = $mysql_connection->prepare('CALL sp_populate_menu_items()');
How to theme the placeholder text?
The background color on my text box is a dark gray. That makes the placeholder text almost invisible. But I don't see an option in the Themeroller to change placeholder text. What can I do?
Unbind mousewheel event and bind it again
I'm using the jquery-mousewheel.js plugin, and I'd like to decide, if user scrolls down, then the content should fade out, and the user should see the next section. During this event, a class changing, and the event should stop, and only the next scroll down should fire it again (bind/unbind). I think I should use an event handler, but I don't know how to implement it in my code. I've tried the code below but its not working, any advice is appreciated. $('body').bind('mousewheel', function(event,
Calculate a total of TD
Hi, I have below code to populate items from basket table. I want to know is it possible to calculate the item_quantity TD and show the total_sum or I should do it at MySQL level? Thanks, Jassim Rahma <div id="divBasket" style="background-color: #FFFFFF; margin-top: 50px; margin-right: 120px; border: 1px solid; border-radius: 25px; padding: 10px; width: 300px; float: right;"> <table width="100%" cellspacing="10"> <?php $session_id = $_SESSION["id"]; $mysql_query = $mysql_connection->prepare('CALL
how can i show from database in modal bootsrap which is data type is json
Hi, i don't know how to pass value from database if check box or radio button put it in and also images, i'm trying to make variable which is save the data for checkbox but still no t works even errors please see line 14-21 i make comment so you gusy can guide me, but for all input type text already success so here is my script, please review , thanks millions time //edit data product $('.edit_button').on("click", function(e) { var id = $(this).data('id'); $.ajax({ url: base_url
event.preventDefault() and IE
I am using jquery 1.4.1.min.js I just discovered that event.preventDefault() causes errors under IE 8. Thanks to Google I found this work around. if(event.preventDefault){ event.preventDefault(); }else{ event.returnValue = false; }; Is there a more elegant way to handle this?
jQuery upgrade from v1.8.3 to 1.11.3 version
My application is using jQuery v1.8.3 for IE 8 browser, now we decided to upgrade the browser to IE 11, so now current 1.8.3 version is not working properly in IE 8 browser. we decided to upgrade the jQuery version to 1x or 2x. Following are questions in my mind, could you please clarify the below question. 1. Can we migrate directly from jQuery v1.8.3 to 1.11.3 version ? 2. Is 1.11.3 version supports the IE 11 browser ? 3. Our application is going to use IE 11 browser, so should i upgrade to 1x(1.11.3)
Does load() prevent js code from being loaded?
I have some code like this: $("#loadit").on("click", function() { load_it($("#loadit"), url); }); function load_it(el, url) { var el_wf = $('<div />'); el_wf.load(url, function (html, status) { el.children().remove(); el_wf.show(); el_wf.appendTo(el); }); } In the url that is loaded I have some code like this: <script type="text/javascript" src="/static/scripts/myscript.js"></script>
Make TreeView Collapsible
I have a treeView with checkboxes which works perfectly the way I want with the help of jakecigar. Now I want to make the tree collapsible based on the tree root node. Please see demo at : https://jsfiddle.net/jakecigar/ap4bjehj/1/. The JQuery and the html are all in the link above, but I adding the Jquery here gain (function ($) { function Tree() { var $this = this; function treeNodeClick() { $(document).on('click', '.tree li a input[type="checkbox"]', function
switch from 1.7.1 to 1.11.1 (Bootstrap v3.3.4)
Hi, I'm redesigning a site using Bootstrap. There are a few scripts and the jQuery used was 1.7.1. Now, as jQuery that comes with the Bootstrap is 1.11.1, some script functionalities have gone away. In particular, there's a product comparison script. It manipulates CSS and HTML code in order to populate a table with product images, links, and checkmarks that apply to specific features of products being compared. If I use the old jQuery 1.7.1, Bootstrap is not working properly, dropdown navigation
Getting 'data' is undefined error in I.E.11
I'm trying to load arrays from a .json doc and populate a table with this data. It works fine in Chrome and FireFox, but not in I.E. 11. When I debug in I.E. 11 I get the error 'data' is undefined for data.insuranceReport. Here's my code: $.getJSON('json/insuranceData.json', function(data) { $.each(data.insuranceReport, function(i, f) { var divData = "<tr>" + "<td>" + "<a href='employees/index.html" + "?dataTablePath=" + f.dataFile + "&insuranceName=" + f.insuranceName + "'>"
Make li as Circular using Javascript
Please help me out.I don't know how to start it. My Task is to make a circular Photo collage using li in HTML and Javascript or Jquery.In which each li will bring one image which has to be placed in different angles too.No li should takes same angle in collage.Please help me out.I don't know how to start it
Access-Control-Allow-Origin issue in chrome and firefox
Hi, I'm using the below snippet to call OData service, it's working in IE only. Chrome / Firefox i'm getting the error "XMLHttpRequest cannot load No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 401. " jQuery.support.cors = true; var call = $.ajax({ url: 'http://machinename:8000/sap/opu/odata/sap/ZWS_PRD_SRV/PRODUCTS?$format=json', type: "GET",
Drag and Drop for input text field
Hi All, I want to drag a input text field and drop into a textarea. Please give your ideas. Thanks Raja
Dynamically dropdown List
Hello, I am dynamically creates a table with 2 dropdown (Container Type & Container Id) using the code listed. The table was created successfully with two dropdown but the statement listed below did not get executed, the alert did not popup. $('#SelContainerTypeId option').each(function(name, val) { var opt=val.text; alert("Value Text " + opt); ???? }); ** I did not understand why the alert did not popup, anything wrong with the code ? Thanks for any advise.
please help me
<body> Nilai a : <input type="text" name="a" id="a"><br/><br/> <select name="oper" id="o"> <option value="tambah" class="tambah"> + </option> <option value="kurang" class="kurang"> - </option> <option value="kali" class="kali"> x </option> <option value="bagi" class="bagi"> / </option> </select><br> Nilai c : <input type="text" name="b" id="c"><br/><br/> <button class="btn2">Hitung</button> <p id="hasil"></p> </body> <script>
i add a attr: data-id to an input text how to get the value?
Hi friends simple question i have this: <input type='text' name='xtarima_izq_0' class='inputNoTarima2' id='xtarima_izq_0' size='10' value='' data-id='1222' autofocus> <button id="btnExecute">Test</button> and i try get the value of data-id attr in this case: 1222 i try: $(document).ready(function () { $('#btnExecute').on('click', function () { alert($("#xtarima_izq_0").dataset.id); }); }); here the fiddle: http://jsfiddle.net/jamiguel77/u3hmLoc9/5/ but not luck!!! thanks
how to scroll on a div? scrollTop and offset.top not working for me.
i have a master div named: myScroll the css: .myScroll { overflow: auto; height: 400px; } and this Scroll have 28 divs (28 rows) with ajax i fill each row, sometimes 1 div have 3 lines in other cases, 12 lines and so on.. (different number of lineS) (see image attached) then i want move to a visible area and i try: $(".myScroll").scrollTop($("divRow_" + idxTar).offset.top); where: var idxTar = $(this).data('id'); idxTar = Number of row here a fiddle: http://jsfiddle.net/jamiguel77/4Lo9ftx6/
Jquery Success/Error Msgs in a Modal possible, instead of .slideDown(); ?
I'm working with a BS3 template and a formbuilder for speed, it suits me for now. However, this form when a user submits a contact request and it generates either a success or an error message, it totally throws the vertical sliding left and right panels of the BS3 template out of sync. It's possibly the .slideDown(); That's causing the worst of it but I'm only just diving in to jquery and unsure if there's a viable alternative to .slidedown Try it Here... if you would like to, the contact script
Next Page