Hide text based on if it's an image or not
Hey! I have some dynamic generated divs, sometimes there's an image into one of the subdivs and sometimes not. What I need to do is to hide/remove the MyText class (remove the text) if there is an image in it's sibling class called MyImage... So if there's an image I want to hide the text belonging (parent) to this div the image lives into. Hope I explained this in a readable way here's the dynamic generated HTML: <div class="Content"> <div class="MyImage"><img src="someImage.jpg"/></div>
problem using detach() and appendTo()
Basically all i'm trying to do is detach all the divs in a class and then reattach them individually using appendTo , depending on the radio button selected. Heres the Fiddle: http://jsfiddle.net/k7Hzs/10/ Any advice would be welcome. Thanks.
Getting Undefined Error while printing iframe through Ctrl+P
I have a document which pops up on the site within a JQuery Modal Box. The document has a print button at the end which just prints the document in the Pop-Up Box. I wanted to print the document, only within the iframe, through Ctrl+P. That required preventing default behavior of printing all the page including the background. This is the JQuery Code for the printing:- $(document).keydown(function(event) { if ( ( (event.ctrlKey == true) || (event.metaKey == true) ) && (event.which ==
.val() on <select multiple> when no options are selected
When .val() is used on a <select multiple> element, it returns an array of all the selected options. However, if no elements are selected, it returns null. It seems more appropriate for it to return an empty array, so that the limiting case is not treated specially.
PDF not displaying in modal
man this forum is s...l...o...w... I have a div that has an image tag with the source of a pdf. Im attempting to display the pdf in a modal screen. But, it's not displaying. Any suggestions $("#pdf").dialog({ autoOpen: false, modal: true, async: false, height: "auto", width: "auto", buttons: {
get rid of brackets around a JSON AJAX response? JSON.parse
I am not getting an error in the callback in firebug. I get the data in firebug from writing to the console. I have attached it below. How do I get rid of the word "object" and the enclosing brackets? The PHP code is correct. It outputs correctly on the php page. Well it has the brackets around everything but it does not have the word object. output from PHP page with brackets only: [{"todo":"","date":"0000-00-00","name":"","id":"609"}, {"todo":"","date":"0000-00-00","name":"","id":"608"},
blur does not work with dynamic fields
has a street name search based on zip code, but it works only for the first line. the selector based on this class, but still added after the lines are not surveyed. http://jsfiddle.net/digaort/kDz7p/ example of a valid ZIP code: 01415005 01042000 01310200 01414000 know someone explain to me why?
Output and format array contents to HTML table
I am using Multiple Dates Picker v1.6.1. I basically want to grab the values in the array [picked] and produce a table with the values from the array onclick. When you hover on picked in dubug mode in Firebug: [ Date { Thur May 09 2013 00:00:00 GMT+0100 (GMT Daylight Time) }, Date { Fri May 10 2013 00:00:00 GMT+0100 (GMT Daylight Time) } ]My question is how can i display the contents of just the Day Month Date and Year in the following format "Day Date Month Year" outputting into a table similar
When i click on a check box, need to get an image
Hi to everyone, Am new developper of Jquery i don t even know if the action i want to make is possible with Jquery. Actually, i want when i click on a check box to choose a product, i get the image of the product. With javascript am a bit lost. an overview : thanks for your advises and ideas.
works in Safari but no other browser - not Firefox, Chrome, or IE -- why?
using jQuery v1.9.1 ....test.html and test2.html are unformatted text: <!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> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Dynamic Header and Body</title> <style type="text/css"> #headerData { font-size:36px; height: 40px; width: 500px; border: thin solid #000; } #bodyData { font-size:24px; height: 200px;
How to select class only in same div
Hello I can select radio val, but how to copy price to new div. Thanks so much <script> $(document).ready(function () { $('.selectitem').bind('change click keyup', function() { $('.myselected').text($(this).val()); $('.myprice').text($('.price').text()); }); }); </script> <h2 style="margin-bottom:20px">Product</h2> <div class="box"> <input name="selectitem" class="selectitem" value="Item A" type="radio"> Item A : <span class="price"> 5 </span> USD </div> <div class="box"> <input
Is it still necessary to use sizzejs?
I'm using a custom jQuery build through this site: http://projects.jga.me/jquery-builder/ . JQuery build: without deprecated, without event alias, and without sizzlejs. Building without Sizzlejs really reducing the size of the file. And selectors still work fine. For IE, I just supports at least version 10. The question is, what is the advantage of using Sizzlejs when i just support the latest modern browser? And whether the benefits without using Sizzlejs?
sliden points problem
hello i have serious problem about my script. my site is like this: <div class="pointActions"> <ul class="point" id="point"> </ul> </div> <div id="menu"> <ul id="example-two" class="group"> <li class="menuItem" id="current_page_item_two"> <a href="#"></a> </li> <li class="menuItem"> <a href=""> <img src="" alt="thumbnail" width="80" /> </a> </li> <li
Page does not finish loading when using getJSON
Hello, I am a beginner to jQuery and I am facing a odd problem. I have to retrieve some information via the getJSON method in jQuery from a php page. But everytime I open that page, my data is retrieved without any problems but the page is shown to be still connecting. Please see image-: Also I am getting weird links when I right click on the back button-: "wyciwyg://:http......" Please see image-: I thought AJAX requests where not suppose to load another page then there should be no
Updated to jQuery 1.9.1
I'm making heavy use of jQuery and jQuery Mobile in a mobile application. I've recently updated my libraries - the one I was using before is started to get a little outdated (jQuery v1.7.2 and jQuery Mobile v1.1.0) and now it's started to catch up with me so I decided to pull the plug on the older versions and upgrade to v1.9.1 and jQuery Mobile v1.3.0 (I'm aware 1.3.1 has been release very recently so I expect I'll update to that). However, for the most part the upgrade was painless and pretty much
jQuery load function stripping out end-of-line characters
I'm having a problem on random IE8 and IE9 browsers when I call the load function on the below html page. It's supposed to simply load the contents of the text file gAddress.txt into the textarea. But for some reason on some IE8 and IE9 browsers, it strips out the end-of-line characters so the text: a b c d loads instead like: a b c d I'm running IE10 on my computer and the process works fine and I've actually found one computer running IE8 where it works (which baffles me even more).
Problem with loading jquery based website in Google Chrome
I recently finished website that is working perfectly on all browsers except Google Chrome... and cannot seem to find solution. It is www.vjencanjanaotvorenom.com Works great on Firefox, Safari, IE but Chrome won't load anything on menu click... I think it is something to do with jquery that should load the window (on open in new window it works fine - even in Google Chrome - but menu clicks don't) Any help is much appreciated ty
jQuery 1.8.2 | Youtube embedded iframe, dynamically load Youtube video without reloading player?
Is it a current fact that using the Youtube iframe embedded player means having to reload the player when dynamically swapping video content? Should I understand that I can only use the swf object embed in order to dynamically change the video src with the javascript API? I use the Youtube iframe API for iPad users (for HTML5 video) and everytime I dynamically load a video by it's ID the whole player has to reload before loading the video. That's alot of wasted time between video loads. Is there
Getting all ids in inside js function
In below code, this div have more than one Ids.I Need to get this js function.How to get this in js function? Code: <div id="Ids">'Id'</div> function idvalue(){ var idvalues = $('[id="Ids"]'); alert(idvalues ); alert(idvalues.length); } I got the 0 length in alert.How to get this?
Preloaded CSS background images not staying in cache for long
Hello, I am a beginner to jQuery, I am using the the latest version of jQuery. I am creating roll overs which when hovered on will change the background image that is used in the style sheet. Now since these images are large I want to preload them using javascript. The code that I am using to do that is-: var img1,img2,img3,img4; var list=[ // Preloading the images to avoid flickering. "images/hoverEffect/foo1.png", "images/hoverEffect/foo2.png", "images/hoverEffect/foo3.png",
Making simple modal demo dynamic
this code works great http://www.ericmmartin.com/projects/simplemodal-demos/ But I can't seem to make it dynamic using an asp.net data list. http://forums.asp.net/p/1902263/5384298.aspx/1?p=True&t=635032668450281300 I suspect my problem is when I'm calling the javascript that updates the image.src i've likely already bound. My issue is not ASP.NET or C# related. I just want to be able to change the popup image. I've emailed the author of the add-in but he has not responded. Many Thanks
JQuery equivalent for HTML fixed position but with additional delay.
Sorry to ask this if this topic is already existed. I don't know the right term for what I am looking for. This it the sample I am referring to http://www.jtricks.com/javascript/navigation/floating.html The element is fixed at an specified position, if the user scrolled the window, the div remains on its position like what the CSS do {position:fixed;} but this sample have properties that looks like it is gliding toward it's original position. How to do this guys? Thanks!
In IE9 String to JQuery object results in loss of attribute.
Good afternoon, If I have a string, and I make a JQuery object from it: var $content = $("<div><table><tr><td style=\"border-style: none\">test</td></tr></table></div>"); How come that when I print this the style attribute is empty? <table><tbody><tr><td style="">test</td></tr></tbody></table> I tested this behaviour in the (latest) browsers: Chrome, Firefox, Safari and it does work fine. So what do I have to do to get this working in Internet Explorer 9?
Loading next url
Actually I am loading my url with the variable .My url like "jQuery("#edit_dialog").load(editPageUrl+'&element='+sElement)" and now i want to add <h1> tag into url so what should i do for it ?
Not able to download custom theme for 1.10.2 from website
When I try to download from http://jqueryui.com/download/ I get this page each time: Ooops!!! An unexpected error seems to have occurred. Why not try refreshing your page? Or you can contact us if the problem persists. I am able to download the same theme in: 1.9.2 (Legacy, for jQuery1.6+). I also cannot download any of the gallery themes in 1.10.2 either, so it is not just the custom theme.
add style to a responseXML
How to ? add style to a responseXML or use the responseXML to create html output in my target option var options = { target: '#arbitrarybox', beforeSubmit: getDataFromScreen, success: getDataFromServer, type: 'get', dataType: 'xml', clearForm: true, timeout: 3000
can you complete this nested each loop?
Hello - I've written the following html test page below. The goal of this test page is to remove embargoed countries from 3 country dropdowns on the page. Nested jQuery each loops can sometimes be tricky to implement. Can you please take a look at the nested each loop below and update/complete it to meet this business requirement?: <html> <head> <script src="jquery-1.8.1.js" type="text/javascript"></script> <script> $(function(){ RemoveEmbargoedCountries(); }) function RemoveEmbargoedCountries()
Jquery's ajax function not being called
I have a web page which fill's form data based on some json data sent from a web service. Once the form is ready to be submitted a function is called which takes all the form data turns it into a xml-formatted string then parses the xml so it becomes a valid xml object. This is where the problem happens, once this data is turned into an xml I would like to post this data back to the web service so the database can be updated. However using the $.ajax() function to post this data, neither the success
Form won't submit when navigated too but will work when accessed directly?
I'm developing a mobile application using phonegap and trying to integrate a form using jquery to post data to an sql database but the form seems to acting in a strange way. If I set the application to navigate directly to the form page upon startup of the application it works fine but if I try to navigate to the form page from an different initial page the form will refuse to work. The problem seems to be with declaring the jquery script on the first initial page. If anybody has any idea what's
Dynamic horizontal menu
Hello guys. I am working on multilanguage project and I need help with top horizontal menu. Problem I must to solve is, that items (UL>LI) on top menu in every language is various long. In some language there is no problem in 1024px browser resolutions (no breaking line), in other there is not enough space in 1280px. So I search for script that convert horizontal menu dynamically to dropdown list according your browser resolution. I found http://css-tricks.com/examples/ConvertMenuToDropdown/ but
Fix jQuery.ajax() errors in IE
Hi all, I thought it might be worth spreading the word about the solution of a strange problem in IE: All my jQuery.ajax() requests were kind of ignored in IE and didn't return any data. After debugging them I got a "parseerror" and a strange "Error c00ce56e" in my IE. This error code is related to an encoding error if using the UTF-8 charset. If you got a similar problem with your AJAX requests not returning any data, try out the following code to see if you also get the c00ce56e error code: $(document).ready(function()
access each newly created element
I have rows of identical form inputs which are dynamically created with an Add Button. Basically what I wanted to do was change the placeholder of one input depending on what was selected in the one next to it. I did manage to get this working but am unhappy about how untidy it is. I found that I could only get it working if I had seperate code for the initial form row and different code for any subsequent rows that were dynamically creaqted with the Add Button. Would anyone be able to advise me
Develop cross word puzzle
Hi, I just want to develop cross word puzzle...For Example see the below link http://teluguone.com/games/crossword/ ...here the letters in telugu..here once u drag any letter and drop into a particular cell ,and u will drag the letter from cell into trash,if u click on any letter at right side matching letters should be displayed in below...once u observe..
I want develop Cross word puzzles,For that i want jquery for drag,drop and trash
Hi, Can anyone tell me,Jquery for drag,drop and trash the images... Thanks, Saritha
scrolling controls a div position
I've seen this Jfiidle example which is exactly the effect I'm looking for.. I've lost who posted it. http://jsfiddle.net/e4VzT/2/ I don't mind using an entirely different technique but in the end what I'd like to see is a div's height controling the position of another div on scroll activity. How o I get this effect working. Any suggestions? Jaimmy
Problem with Autocomplete and mysql
Good morning, i have got a problem with jquery ui autocomplete. I use mysql, json and php as source for my autocomplete. If i wirte a word in autocomplete widget it will view all entries. // Conect json.php $sql = "SELECT user_name FROM user ORDER BY user_id"; $mysql->query($sql); while ($row = $mysql->fetch_array()) { $data[] = array('label' => $row['user_name']); } echo json_encode($data); The Php File shows me: [{"label":"53343"},{"label":"53773"},{"label":"53773"},{"label":"53773"},{"label":"53773"},{"label":"70736"},{"label":"79353"},{"label":"40231"},{"label":"47445"},{"label":"47475"},{"label":"53343"},{"label":"53773"}]
Positioning an element under another element
I have a title and subtitle. The title is draggable and if the user clicks a button, I'd like to center the subtitle under to where they just dragged the title. Below is the markup and code I am trying to do this, but it does not work. Can someone help? <div id="titleDiv" class="draggable"><label id="title" class="title">Team Title Here</label></div> <div id="subtitleDiv"><label id="subtitle" class="subtitle">Team subtitle that might be really really long</label></div> $(".alignSubtitle").click(function
a problem of jQuery's fadeIn() in iPhone (Version>=1.8.0)
I found a special bug of fadeIn. It blinks twice in iphone browser,and In PC browser is ok. This bug appear in the version 1.8.0 and higher. In 1.7.2 is ok. The link: http://www.queyang.com/blog/wp-content/uploads/2013/04/test1.html Short link: http://t.cn/zTqdW1z Use Iphone's safari, and press the browser Back and Forward buttons after clicked the button. The code: <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" /> <script type="text/javascript"
fadeOut() doesn't work, hide() does, why?
I want to show an image in full size once it's thumbnail is clicked, however there is a problem with hiding the image, for some reason, fadeOut() won't do anything, however hide() does. There's the code: This is the div into which the image is appended: <a href="javascript:void(0)" onclick="hideImage()"> <div id="fullImage"></div> </a> The CSS: #fullImage { position: fixed; right: 0; top: 0; z-index: 20; width: 100%; height: 100%;
Ajax no-conversion
Hello, Is there a way to receive a binary response from ajax and do no-conversion? Just receive it as pure binary. Thank You
Next Page