Get coordinate relative to other elements whith css transform involved
I'm thinking about a way to get coordinate of an element relative to another element when there is transform applied in between (either directly on those elements or somewhere on the dom tree). We can easily convert coordinate with the used of getComputedStyle().transform which return the matrix to apply. I have a running code doing it. We could do this way : All function would take the first element. - jQuery.toPageCoordinate() would return a function(x,y) to convert coordinate relative to element
multidimension json array
Hi there, I have a multidimension array: { "errorCode": 200, "errorMsg": null, "obj": [ { "comparableInfo": null, "id": 1, "name": { "comparableInfo": null, "val": "EUROPA", "id": 0, "description": null, "traslation": { "EN": { "comparableInfo": null, "lang": null, "val": "EUROPE" }, "IT": { "comparableInfo": null, "lang": null,
Greetings Everyone from Alabama
I am writing a script to hide divs and containers with a click but the problem that i am running in to is that they are all linked to each because of the class used. I have tried to incorporate (this) into the script but nothing seems to work. Click one and they all open or close. What i would like it to do is hide the element on page load and show each one when clicked. $(document).ready(function() { var hcon = $(".hide-content") var hbtn = $(".hide-btn") $(hcon).hide(); $(hbtn).click(function()
JavaScript Questions ?
Hi, can someone ask questions about JavaScript as well on this forum ?
How to update JQM from 1.0 to 1.4.5 in Dreamweaver CS6?
Hello, Trying to update JQM 1.0 to 1.4.5 in Adobe Dreamweaver CS6 in a Win. 7 platform. Searching for help from Adobe has not helped. I can replace the old JQM files with the 1.4.5 into C:\Program Files (x86)\Adobe\Adobe Dreamweaver CS6\configuration\Third Party Source Code\jquery-mobile or replace them in the index.html page and link them to the updated files. The problem is that the old C:\Program Files (x86)\Adobe\Adobe Dreamweaver CS6\configuration\BuiltIn\Mobile Starters\_notes files are not
OOPs
I typed in my sign up email wrong, please add a " p " in metalchipper. I can not change it from this side. What a way to start! Thanks, Mark
Control Scroll in Child Page From Parent Page Using jQuery
Can you please let me know if it is possible to control the scroll to element which is in child page from parent page? Lets say I have a.html like this <div id="header"> <a href="index.html">Homepage</a> <a href="2.html#app">App</a> <a href="2.html#map">Map</a> <a href="2.html#tap">Tap</a> </div> and in 2.html I have <body> <div id="app" style="height:600px;">App Section</a> <div id="map" style="height:600px;">Map Section</a> <div id="tap" style="height:600px;">Tap Section</a> </body> now what I
Themeroller beta 1.5
Is there a Themeroller for the beta version (1.5). It seems the 1.4.5 version is different enough that it makes testing the beta version difficult to know if there are bugs or if it's a change caused by differences in the theme.
cropbox.js
I can't get jcrop to work with my Drupal application. It doesn't drag and the preview image isn't a full size image so I suspect a clash of css somewhere so I have been looking at cropbox.js instead. Is it possible to upload the cropped image to library on the server as an ordinary post instead of ajax and if so how please? jcrop uses x1, y1, x2, y2 positions
Slide toggle text content inline within a button
I'm relying on the jQuery UI library to animate the sliding toggle. jQuery toggle and slideToggle by default is just not suitable for what I want - Ii only want to animate smoothly along x axis (width). Everything works but when the slide action animates, it slides out on a new line (block) and then when animation is finished it 'flicks' back into the inline style I originally set for it. For better illustrative purposes, here is the JS Fiddle for it: https://jsfiddle.net/coolwebs/dx8fd51f/15/ I
the function each and map?
jQuery.each( array, callback ) jQuery.map( array, callback ) in the callback of each,keyword this will point to the iteratee of array, while of map,this will point to the global object. why design it like this? sorry for my English.
why popup is shown
Hi, Why the datepicker popup is sown every time form is validating as you can see in the attached message and how to avoid? Thanks, Jassim
check for 2 actions user makes on submit
Hey everyone. I have a function that should check if a div is empty and also if a user clicks the submit button at the same time. If both are true then I want to return an error to him. I just don't know how to define the 2nd variable (var submit) of the click event with Jquery. can you help me with this little puzzle here?
My app page height is too large
My app page height is too large, maximum 8000px. So for this reason the full app page not showing after app installation when I am show in iPhone. After few heights at the bottom - the app page not scroll. It is lock. Hay any problem at my app page? It is only for IOS. But android app has no problem.
How can i make two functions into one ?
Change and Ready function are duplicating. can i make it one ? $("#aus_state").css("display", "none"); $("#company_country").change(function(){ var country = $("#company_country option:selected").text(); if(country == 'Australia'){ $("#other_state").css("display", "none"); $("#aus_state").css("display", "block"); $("#company_post_code").attr("maxlength","4"); } else{ $("#other_state").css("display", "block"); $("#aus_state").css("display", "none"); $("#company_post_code").attr("maxlength","10");
$.post, $.ajax, $.get making server request using old values
I have a problem with my $.post and $.ajax function. I have a basic structure of the function but I do not understand why whenever I make a post request or ajax request(cache set to false), my php script receive old requested value sent before my current one.. I dont have any idea why it receives value from old request instead of new one. Any help would be much appreciated.
how come there is the function $.fn.ready?
$.fn.ready(callback) ,it just bind the callback to the event DOMContentLoaded for the document node. so,why not make it be a static function mounted to the $ object? it's strange to make it a function mounted to $.fn
Dynamic page theme swatch don't work properly
Hello, first of all I apologize for my bad english. I'm trying to dinamically change the page theme with the function found in the jquery mobile API documentation. The function is like that: $('[data-role="page"]).page( 'option', 'theme', 'b' ); If i run this function several times with different swatch themes, it add the page css class theme for each swatch instead of switch it. Example: I load the page with default theme. It add in the page class: ui-page-theme-a Then i execute: $('[data-role="page"]).page(
Image file size
if (res == "jpg" | res == "png") { var reader = new FileReader(); reader.onload = function (e) { $( "#the_image3" ).replaceWith( "<img name='image3' id='image3' src='' alt=''>" ); $('#image3').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]);
Opening As one Closes + Refactoring
Hi, Hope you're all well. I'm building a menu which opens another menu, total of 3 tiers. At the moment the menu works great - but the panels overlap each other as they open. Ideally i want to open the sub menu which closes the previous one so only one menu is open at a time. I have done a fiddle for you to see. https://jsfiddle.net/ev35gu2b/ Please help, many thanks.
trigger a radio button change from a link
can I do that calling a radio event from a normal a link ? var form = $( "form[name='checkout_form']" ); var rd_shipping = $( "input[name='radio_shipping']" ); // a radio button var shipcalculate = $("#shipcalculate"); // an a href link rd_shipping.change(function(){ form.submit(); }); shipcalculate.click(function() { rd_shipping.trigger("change"); }); thanks to all
$(...).datepicker is not a function error.
This form of mine works totally fine locally SEE HERE . But when i run it on the server it throws a $(...).datepicker is not a function. Why ?
Getting file upload to upload to the correct directory
I'm doing this file upload jQuery File Upload and I'm trying to change the path of where the file needs to be uploaded. When I upload the file in my firebug I get this error POST http://localhost/cms/public/admin/frames/public/frames_images 404 Not Found I do know that this error means that it can't find that directory. The problem is that I don't want the directory to look like that, what I want it to look like is this. http://localhost/cms/public/frames_images This is the code that allows the files
npm package
Hi, The release notes for jQuery UI 1.12.0 Beta 1 mention that the npm package for jquery-ui is now maintained by the jQuery UI team. However, the most recent release of jquery-ui on npm is 1.10.5. Is there something stopping the latest version of jQuery UI being published on npm or is it likely to happen in the near future? Many thanks for any help. Tobias
Find the position of the mouse
Hi Could not solve this: Find the position of the mouse pointer relative to the left and top edges of the document. I wrote something like below (i know it is quite wrong :) ), would appreciate help in correcting it: <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script> $(document).ready(function(){ $('body').mouseover(function(){ var x = $('body').offset(); $('body').append("Top: " + x.top + " Left: "
menu widget: autocomplete and same keypress several times
Hi All, i am using jquery-ui 1.11.4 with selectmenu autocomplete My selectmenu has items with values like 4, 44, 5, 55, 555 pressing the keys(4 or 5) multiple times the autocomplete feature selects only the items with value 4 or 5 but not the others i found the problem in the ui.menu widget (jquery-ui.js) _keydown: function( event ) { ........ default: preventDefault = false; prev = this.previousFilter || ""; character = String.fromCharCode( event.keyCode
Destroy a Dialog and Re-Create
Hi everybody, I have a problem in making a new instance of a dialog that contains a div contained in a page. The dialog does not open after destroy, I want another instance....... HTML page: <div id="test"> <input type="text" id="name" name="name" /><br /> <input type="radio" id="foo1" name="name1" /><br /> <input type="radio" id="foo2" name="name1" /><br /> </div> <br /> <input type="button" id="openDialog" value="Open" /> JS page: $('#test').dialog({ autoOpen: false,
Having Issue on Looping In JSON File
Can you please take a look at This Demo and let me know why I am not able to load all objects in the JSON file under `utility` into the table var data = { "utility": { "Water": { "account": "99999", "balance": "5555", "owner": "Fred" }, "Phone": { "account": "7777", "balance": "6666", "owner": "Mark" }, "Power": { "account": "A9885", "balance": "2222", "owner": "Suzan" } }, "clients": { "David": { "account":
JQuery UI - DatePicker not accounting for scroll height from scrollTop when using Chrome
My apologies if this is posted in the wrong location as I'm new to JQuery. I have a webpage that has several divs that are dynamically built using JavaScript. When the page loads, the datepicker popup windows positions itself correctly over or under the input fields of date fields. However, if I trigger a div to be created dynamically and scroll down the page to that div to select a date field, the position of the datepicker popup is appearing much further down the page and not attaching itself
fixed columns in jquery data table
error coming Cannot read property 'cell' of undefined for fixed columns for datatable taken in tabs can any have solution for this issue?
sketch.js paint program image processing issue
Hi, I am testing out the sketch.js with html5 and canvas for a paint program here. There are two problems that I encountered. First is I want to be able to dynamically change the background cat image example for canvas. <canvas id="SketchPad" width="800" height="300" style="background: url(http://farm1.static.flickr.com/91/239595759_3c3626b24a_b.jpg) no-repeat center center;"></canvas> I tried to change the background with the code I found. $('#file-input').change(function (e) { var file
.click(function() input.focus()
Hi when clicking a normal link i'd like to put the focus into an input type text the following doesn't work jQuery(function($) { $('#link_any').click(function(){ $('#input_any').focus(); }).trigger("click"); }); thanks to all
How to get current location weather forcast onclick pop-up?
Hi All, I need to have a weather icon, once click the icon, it should pop-up with the current location weather details. How to achieve this? thanks in advance
What is going on with jQuery Mobile? No more updates after 1.4.5
What is going on? the last update was 1.4.5 which was released in October 2014? Is it ever going to get updated ever again? why has it been so quiet?
select box get selected value onload
Hi ! this code actually works for me but only when select box change jQuery(function($) { /////////////////////////////// $( "#selectbox" ).change(function() { var country = $('#selectbox').val(); if(country == 'extra'){ $('#selectbox-extra').attr('data-hidden', 'show'); } else{ $('#selectbox-extra').attr('data-hidden', 'hidden'); } }); ///////////////////// }); I want to check onload AND onchange if option = 'extra' is selected and then apply or not $('#selectbox-extra').attr thanks
using jquery dialog to submit a form on clicking yes button and cancel form submission on pressing no button
I have been creating a page in jsp and passing the data to servlet, I have used jquery dialog as it can have customized buttons, even the dialog is not being displayed and it is directly submitting the form. I dont know how to display the dialog and submit a form on clicking "Yes" in dialog. Please help me in solving this below given is my JSP Page JSP Page <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD
Updating DIV HTML
I am trying to update the HTML of a div using .html. The var that I am overwriting the text with, has these characters: /, ", =, .. When I attempt to set the html of the div with this var content, it does not update. Is there a way to update the div with this content in the var?
Can not escaped the input value
I'm trying to a html escaped value into a input (submit). <div data-role="content" data-theme="a"> <div role="main" class="ui-content"> <form action="" method="post"> <input type="submit" value="<s>aaa</s>"> </form> </div> </div> I think display a value: <s>aaa</s> But displayed: aaa
Problem with jQuery snapping / scroll to
Okay, here's the site I am working on: http://cf5.e6f.myftpupload.com/?nocache=1 I suggest checking it out on a mobile device, otherwise you'll need to do it on a desktop with your browser window as small as it can go horizontally, and also shrink it up vertically as well to mimic a mobile screen. Now, start scrolling down until you get to the 'Resume' section. You'll see the issue I have. The content for the 'Resume' section exceeds the viewport since it's long. However, when you scroll down, it
JQuery 1.12.0 and old browsers
Hello! After update 1.11.3 version to 1.12.0 I got problems with old browsers. Error sounds like "NS_ERROR_XPC_NOT_ENOUGH_ARGS: Not enough arguments". Looks that problem is third argument in removeEventListener, in some places calls running without it. I know this argument is optional, but in older versions it always passed. Any ways to fixing it? Thanks for feedback, Dmitriy
Next Page