Size of a not yet loaded picture
How can I get the size of an not yet loaded picture? Loading it would be a possibility, but I don't want to / cannot wait for every picture to complete loading. I just want to have the size! And could i possibly force all pictures to load their metadata?
same kind of elements in closest api
$("ul").on("dblclick","img[src='img/arrowdown.png']",function(){ alert($(this).closest('ul.w1m > ul').length); }); output is 0, but there is one "ul" in other "ul.w1m" why output is not 1? <ul class="w1m"> <li><div><img src="img/minus.png"><img src="img/arrowdown.png"><img src="img/link.png"></div><div id="wu1m2" contenteditable="true" class="w1mc">b</div> </li> <ul> <li><div><img src="img/minussub.png"><img src="img/link.png"></div><div id="wu1s0m2" class="w1smc" contenteditable="true">Websites</div>
Differ XML and HTML from AJAX request
Hello! I'm totally new to the AJAX function of jQuery. I'm about to develop a dynamic page. But the problem is, that I'm sending a request and the answer could be a HTML or a XML document. There is absolutley now way, that I can dicide what type the server is sending me! So I was looking for a way, to decide whether the answer is a XML or a HTML document. What I'd like to have too, is the possibility, when I have a HTML document as answer, that I can access the nodes and stuff like my current DOM.
NOT A JQ question but I hope some one can help!
I am able to see all gif - swf's jpeg and flv videos which I place on my web page providing I look at the actual html page where the info has been paced. When I try to view it in my home page on the DW program I get the following message: Flash player GET THE LATEST VERSION! I did that loded the latest version but still no picture or video visible in the DW program. By itself one by one page viewing in the browser no problem but not in the home page. Any Ides why??? Hope some one has a similar
I want to find the heights of my columns after images load.
I have a page with three columns. I have the following code: $(document).ready(function(){ var left = $('#left_sidebar').height(); var right = $('#right_sidebar').height(); var center = $('#content').height(); }); The 3 variables give me the heights of the columns before all images are loaded. Is there a way to find the heights AFTER the images load? thanks, mike
Image Cropping with focus
Hi, I am looking for a certain plugin, I don't know, if one exists that way. Here's what I expect it to be able to: take an image from the DOM find important portions of that image using any technique Crop/Center the image to the portion found in step 2. Finding important portions means to me, that th script automatically should determine, which portion will probably be of interest to a viewer. It may use an entropy algorithm, or any similar and effective method. I do not need any uploading capabilities,
Set a checkbox to unchecked if a Checkbox or Radio button isn't checked, when specifying by name and value
I need to set a checkbox to be either checked or unchecked based on whether specific Checkboxes or Radio button are selected. I know how how to do this for checkboxes when I specify an id # for each element and use if ($(this).attr('checked'), but I can't get it to uncheck when I specify the names and values of the checkboxes instead. I also haven't been able to get it to uncheck when a radio button is unchecked, even when I specify an id # for each element and use if ($(this).attr('checked'). Ideally,
blur after mousedown
Is it reliable to assume than blur always fired before mousedown? I am developing a datepicker. I need it not to close when a user clickes on a date. (UI does not fit my needs.)
Ajax - How do I make it lighter?
Hello, I need make multiple queries using Ajax, but every time that i do it the document is slow, how do i avoid this? Sorry for my english!
HTML5 Image upload with javascript and php
I want to multi-upload images to a database using javascript and php (html5), but I have problem with it, my code is just uploading one image, which is the latest photo selected and not all. How can fix this problem and what do I have to do? I use developer mozilla html5: Here You can test my code by selecting multi images and clicking on button Upload Image to see the result. DEMO FROM MY FULL CODDE My js code: function doClick() { var el = document.getElementById("fileElem"); if (el) {
Recursive dialog window and mystery error message
I'm training myself on jQueryMobile and using dialog windows for form submission The form itself is being submitting via AJAX and when there is a problem with the logon attempt the response kicks in an alert with the error message. While the submission technically works I'm running into three problems. The first is that when a user successfully logs on jQueryMobile itself flashes an error dialog momentarily and then proceeds as normal. The second being that when an error alert is kicked in, the alert
Hide/Show nextAll TR when Click in TH (without affecting subtables into table td)
Hello from México, my english isn't very good, sorry. I need this... <style> *{height:20px;width:100%} table {;background:#999999;<--border-collapse:collapse-->} th {background:#aaaaaa} td {background:#bbbbbb} </style> <table> <tr> <th> Principal Item <--- show/hide all next TR:gt(0) except in subtable </th> </tr> <tr> <td> Information... </td> </tr> <tr> <td> Information... </td> </tr> <tr> <td> <table> <tr>
run function after get API ends
creatediv.html creates new <p> into "newdiv". but output is always 0 $.get('creatediv.html', function(data) { $('#newdiv').append(data);}, 'html'); alert($('p').length); ////////////////////////////////////////////////////////////////////////////////////////////////////////////// if write like this output is 1: $.get('creatediv.html', function(data) { $('#newdiv').append(data);}, 'html'); setTimeout("plength();",1000); function plength() { alert($('p').length); }
How would I access Multiple records inside JSON
How would I access Multiple records inside JSON This sample only works if i have one record. Thanks to POPNoodles for helping me so far <script type="text/javascript"> $(function(){ $('#email').blur(function() { var email = $('#email').val(); $.ajax({ type: 'POST', url: "searchdb3.php", data: {email: email}, dataType: 'JSON',
$ undefined error
I am getting a "Microsoft JScript runtime error: '$' is undefined." Both files (jquery.tools.min.js & jquery.corner.js) have been included in the project. Any thoughts? <script type="text/javascript" src="Scripts/jquery.tools.min.js"></script> <!--[if lte IE 9]> <script type="text/javascript" src="Scripts/jquery.corner.js"></script> <script type="text/javascript"> $("input[type='button'],input[type='submit'],input[type='reset']").corner(); </script> <![endif]-->
Link glow for JQuery 1.6.4
Does anyone know how to make links fade in a glow when the mouse hovers over it, but for JQuery 1.6.4? I know the newest version is 1.8.x, but that version for some reason breaks my website's preloader, and I'm too tired to figure out why it doesn't want to work with 1.8.x, so I'm stuck with 1.6.4, which isn't too old I think. I've googled all over the place and found a few tutorials on link glows (JQuery-color, JQuery-color-animation, etc), but all of these only work for JQuery 1.2.x or 1.8.x after
Screen Invalidation
My question is in regard to the order in which my javascript is executing. I have a rather lengthy function which is pulling data from a server via $Ajax. The first line of this function calls another function which is supposed to show a full page and partially transparent DIV. The idea is that I put this DIV up to gray out the screen, which lets the user know some work is being done for a few seconds while the function is running. At the end of the function the DIV is made invisible again. That
Ajax url parameters as a variable. How?
Is there a way to set a ajax url with a variable? function ajaxDialog() { $.ajax({ url: url, type: "POST", DataType: "html" }); } Thanks in advance! Guilherme Longo
Very simple password function. HELP!
Hi everyone. I'm developing a staff phone directory app for my work with JQM. I'm using a nested listview that displays names and then when a name is clicked, the phone, mobile, and email address of an idividual is shown. The listview is 199 entries long and each entry has 3 sub links. This makes the listview very slow to load. I have tried looking into the lazyload widget but I feel it's beyond my skill level to implement it. Instead, what I would like to do is initially load a login screen
Getting "Resource failed to load" while redirecting from one page to another ??
index.html : <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Popup</title> <link rel="stylesheet" href="../css/jquery.mobile-1.2.0-alpha.1.css" /> <link rel="stylesheet" href="../css/jqm-docs.css"/> </head> <script> function tosubmit() { var JSONObject = { "response": { "auth": "N" } } ; var mytext = JSONObject.response.auth; // Storing the value above into localStorage
.on() not working in 'Page transition events'
I'm using JSDT and it shows that .live() is deprecated. so using .on() like $('#wow').on('pagebeforeshow',function(event){ alert("haha"); }); it didn't work (.live works well) but when using .on like $(this).on('pagebeforeshow',function(event){ alert("haha"); }); it works. so i'm using .live() now, but using .on some day. Thanks for taking a look and helping me out - any pointers appreciated. development environments are jquery.mobile-1.2.0, jquery-1.8.2 and chrome.
issues with viewing jquery.com HELP please
Hello to everybody! to start with a jquery.com does not load for me, actually it does not load any visuals(css). Then I have encountered an issue with viewing a jquery of a website from my laptop that I have build the website with, but I know that it works, cause a person in the office next to me can view it without any probs. Well now I am using the jquery libraries locally and I can view whatever I develop, but not the mentioned above website or jquery.com. And even that website http://gvweb.es/add-ons/varios/zoomer/zoomer.html
Javascript does not work on my page
Hey guys, I'm having a problem with my javascript. I have it put at the very end of the body tag like so... echo '<script language="text/javascript"> $(document).ready(function() { $(window).scroll(function(event) { var top = 0; var y = $(this).scrollTop(); if (y >= top) { $("#byos-menu").addClass("byos-fixed"); } else { $("#byos-menu").removeClass("byos-fixed"); } }); }); </script>'; echo '</body></html>'; I've put alerts in the js
jQuery.parseJSON of an array not working
Six Months ago I started another thread about json_encoded arrays, because I was having trouble grabbing data. That thread did give me some solutions, and until just a couple days ago I had no problems. However, now I am having problems with characters like slashes and commas. Following are the details: Php script encoding the array echo "<td class='e'><input type='checkbox' class='Record_Chk' value='". json_encode($row_array) ."'></td>";jQuery Script $('.Record_Chk').click(function() {
adding a new image after a click
i am trying to add a new image when i click the z pass button my this part of the code is not working http://jsfiddle.net/UjJEJ/24/
finding text in any div
How can I set color of jack as red? I have to use .find() API ` <div>linda</div> <div>jack</div> <div>george</div>`
Ignoring child element while triggering parent
I faced interesting problem. I'm using jquery mobile for my project, and i have footer with navbar inside. I wrote script to toggle it when i click/tap on it. But tap/click executes when i click on any element inside navbar, that is inside footer. I tried to use stopPropagation, but that disabled ajax page loading aswell. Is there any ways to ignore element only for certain script? Here is example of my code: <div data-role="footer" data-id="main_footer" data-position="fixed" data-fullscreen="true"
How can I achieve smoother animations?
I'm using jQuery animate function to animate the left property of a div with a lot of elements inside of it, for some reason in Firefox the animation is laggy.. There is a solution for that?
IE 7 and .append()
i am appending some html like below in my jquery orderDetails = ''; orderDetails += '<tr valign="center" id="tr' + MenuId + '">'; //orderDetails += '<td width="40%" class="cartHeaderRow">' + "<input id='txtHidMenId' type='hidden' value='" + MenuId + "' />" + jQuery.trim($(".name", row).text()) + '</td>'; orderDetails += '<td class="cartHeaderRow" style="word-wrap: break-all;width:155px;"><div style="width:120px;word-wrap: break-word;">' + jQuery.trim($(".name",
Validate plugin: Duplicate success labels... Still?
Hi, great plugin, however I believe that the issue with duplicate success labels is a bug. There are some solutions that use css and !important to override the error class with another (eg success) class (ie DONT remove the error class) but surely thats the wrong way to do this? I am using v1.10.0 of jquery.validate.js with the following rules... rules: { your_name: "required", message_title: "required", your_message:
How to stop sliding when reaching the last image in jcarousel???
hi i'm having an jcarousel dificullties. I'm using a jcarousel slider with an animation function i've created (fadeIn-fadeOut), but when i'm clicking on the next button the slider doesn't stop at the last side, but goes on and there's a lot empty space-slides. so how to stop sliding when reaching the last image in jcarousel??? thanks in advance here's the code: <?php if( $this->getRequest()->getModuleName() =="cms"): ?> <script type="text/javascript"> //<![CDATA[ function mycarousel_initCallback(carousel)
jQuery opacity not working
I am trying to change the opacity of the image after I click the red button instead of adding the different image, and I should not see the red button on the new image My JS code is below. http://jsfiddle.net/mwPeb/7/
Auto Complete highlight the typed characters
Dear All I am using autocomplete / suggestion It works great however it has facility to hightligh the characters in bigining example if a person typing ion and in database table we have word rationing Word rationing is being display properly (word ion is in middle of string) How can i highligh the selection part in short word rationing I want to be displayed as rationing highlinght the word typed by user pls help What had tried <?php $string = "Rationing is compulsory....."; $foo="<span class=\'scrolltableheading\'>foo</span>";
Adding jquery to the index.php
Hello guys'n'girls, i'm currently working on a gallery for myself and learning a lot about jquery. Today i got stuck at one point and i hope you guys can help me out. The thing is that i wanted to automatically create a mousebutton listener for a gallery overview i have. Let me explain this with a little more depth. I'm having a script which scans a folder for subfolders and copys those subfolder names into an array. Those subfolder are my different themed galleries. In every subfolder are pictures
Problem with images, binding load events and http codes
Hello all. I have some problems with an ajax call that should be quite simple and now I'm completely lost, so any help would be great. Ok, let's go: I have a web page working at this moment, ok, and I use $.get() to load a table into it (html format), this is working ok too. When user clicks in <tr> tags, I use $.get() another time to get some more html data, including an image as an <img src=". . .">. the server send me the image only if a user loaded it previously from an external 'admin site',
HTML5 datepicker not working on iOS/Android by using jQuery Mobile
Hi We are trying to implement HTML5 datepicker in our web application but its not working. We are also using backbone and jQuery Mobile in our project. What could be the issue? Is there any alternative to HTML5 datepicker.? Thanks.
JQuery - Drag and Drop - Web method is calling at every post back.
Hi , In our application we are using a JQuery Drag and Drop functionality . We have the below scenerio, Drag and Drop - Functional logic for resequence order is handled by calling a webmethod on code behind. While double click over any rows over GridView we have to Highlight the row to Red and . We should do the logical delete on code behind using entity class property. [This Double click logic is handled over GridView_SelectedIndexChanged event] Even the above function we achived . We are facing
Nice BMW X1 site! How did they do it?
Check this out: http://www.bmw.com.cn/cn/en/newvehicles/x/x1/2012/showroom/highlights/index.html#id=phase_exterieur I didn't know jQuery can make such complex animation. How did they: 1 Merge cut images to be one image 2 Make the flying birds animation 3 Mouse wheel control 4 Interior & Exterior switch (click the arrow button at the right bottom cornor) Any idea?
Automatically populating a text field using AJAX
Hello, I'm coming up to speed with JQM but am a newbie with AJAX. What I'd like to do is dynamically populate a form's text field with data coming from a digital scale, refreshing every few seconds. When the form gets submitted, the currently displayed weight gets inserted into the database via standard form processing. The scales are on order and I've requested technical info, so I'll need to figure out some of the details when I have the hardware and specs. We will be using PHP on the server
Android Touch and Hold
I have a wallpaper that I'm making available for download on a Sony Tablet S. Android 4.0.3. The goal is to allow the user to tap and hold, a pop up comes up that allows the user to save the image to their device. The html and css are created with jquery appends. This is working on the iPad, but not on the Sony. This didn't help: -webkit-touch-callout: default or inherit. I have the following: -moz-user-select: none; -khtml-user-select: none; -webkit-text-size-adjust:none -webkit-user-select:
Next Page