non-stretching background?
I'm trying to make a nav menu. I've not done much jquery before, but have managed to get this far. I expected the default behavior to not stretch the background image, but it does. Is there a css3 tag or some other approach I can use to prevent the background from stretching when I change the height of the div? Here's my menu so far... <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
Using a contains with variables in an if statement
I have am fairly new to jquery and was wondering what the best way to check to see if one variable contains another. My first var is a string of values. example Value1;Value2;Value3. I have tried various approaches but none have worked. $(".EI-Disc-Outer").each(function(i){ var metadata = $(this).find('.EI-Metadata').html(); var pageMetaTitle = ";" + pageTitle;
Need to delay jquery script
Hi guys, I'm sorry to trouble you but I'm a complete noob in jquery. So, I got a slideshow, I've managed to make it work, but it hasn't a auto-play function. So someone gave this code to enter in .js file. I've pasted in the code and it worked. The problem is that the first image disappears way to fast, so I've been trying to delay the function for the last 2 hours. Don't have to say that was unsuccessful Heres the line of code: /*******************************************************************
Chrome throws 'e is not defined' or 'r is not defined' on any page that loads jQuery
I'm using OSX 10.7.5 and Chrome 26.0.1410.43. Can anyone else coo-berate this? It is either e or r and they show up on the console on page load. Here are the exact errors: Uncaught ReferenceError: r is not defined Uncaught ReferenceError: e is not defined Safari and Firefox won't throw these errors. Is it Chrome... or perhaps a Chrome extension I'm running?
jQuery 1.9.1 | If variable matches comma-delimited string, do something, else, do some other thing...
But not so easy as I thought in my scenario, I have a variable which is basically the video ID of a Youtube link that I extract from a url once clicked, which, if matching a substring (video ID) of a comma-delimited string of video IDs found in a input text box, should trigger an event., like so: var videoID =$("#videoIDholder").val(); // <-- the stored link video ID var str = $("input[name=StringOfVideoIDs]").val().split(','); if ($.inArray(videoID, str) !== -1) { alert('match!'); } else { alert('no
How to optimize Jquery Code
Hi! i try to build something like this on my new page: http://styleplantage.de/jquery.html But i´m new with jquery - so how could i shorten this script? Do i have to make a plug-in for one box? im really stuck at this point because i know theres a much better way to do this! $('#sidebar-1') .hover(function() { $("a#btn-kontakt-1").stop().animate({top:'0px'}, 300); $("#sidebar-outline-1").addClass("sidebar-outline-hover", 100); }, function() { $("a#btn-kontakt-1").stop().animate({top:'-80px'},'2000');
Webcam auto refresh with jQuery
The website is made with CMS Drupal, so every jQuery code is like this: (function ($) { //code here }(jQuery)); as mentioned on the Drupal documentation. I have other jQuery codes and they are working perfectly. The idea is to put webcam that will auto refresh in couple of seconds. The source for the webcam is picture of webcam that is refreshing and it's like this: <body onload="JavaScript:timedRefresh(30000);"> <img id="live_cam" src="http://www.website.com/images/livecam/livecam2-bg.jpg?time=1364566398">
Trigger code behind from a jQuery dialog
[using Visual Studio 2010] Hi Guys! This functionality seems so childishly simple...but I have searched for days to find an answer. Here is my jQuery Dialog: <script type="text/javascript"> $(document).ready(function () { $("#myDialog").dialog({ autoOpen: false, resizable: false, width: 400, height: 250, modal: false, buttons: { "Ok": function () { $(this).dialog("close"); //return true; }, Cancel: function () { $(this).dialog("close"); } } }); }); When the user clicks the "OK" button, I need
Draggable content that will work on an iPad and iPhone as well as desktop computers
Before I start, may I just say that I am no web developer. If anyone can help me with this could you please answer in a way a 4 year old child, or Forrest Gump would understand. I'm having some trouble updating my current website so that it will work on an iPhone and iPad in the same way that it works on a computer. Below is a link to my site... www.hagueandhague.co.uk As you'll be able to see from the homepage, users are able to drag around the icons on the screen, they can also resize them by dragging
jQuery scrolling to anchor -> but prevent bumping to bottom of page
I made a smooth scroll on my page, but when scrolling to the last anchor on my page the scroll just bumps radically to the bottom, because the content of my last div is not enough to fill the whole page and so the nice easing at the end is gone. The function tries to put the anchor to the top of the page, but the div is to short. Is there some way that I can prevent this? Is there some way the tell the function not to bump to the bottom? Many many thanks in advance! http://jsfiddle.net/5FwcT/4/ $('.submenu
Problem in jquery image zoom effect
Hello Freinds, Here is the link when i download the demo of the image zoom effect http://www.visual-blast.com/source/jqzoom/jqzoom_v1.2.rar I apply this in my page but my image size is large and in zoom efeect size is small when i change zoom effect in below changes result not get only zoom 100 got result i want large zoom effect how can i do this <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready(function(){ $("img.jqzoom").jqueryzoom({ xzoom: 150, //zooming
Window Resize
I'm hoping to get some assistance. Is there a way to use the .resize function to continually update the width? You will see in the example below the "accordionW" grabs the window width on the page load but I'm hoping to figure out how to have it adjust when the window size changes. Can anyone help? Thanks! <script type="text/javascript"> $(function() { $('#va-accordion').vaccordion({ accordionW : $(window).width(),
Slide Up - Slide Down
i have a pretty basic(based on something i saw online) site going that uses a few jquery plugins and though i am pretty noobish i am accomplishing basically what i need, except one last feature that i want, sliding page transitions. the page is far from done but the basics are in place, www.costaricafishingpackages.com i want to add links that open the new page by sliding it either up or down depending. the new page would be a horizontal scrolling page as well. does anybody know of a jquery plugin
Everytime I think I'm getting the hang of this, something else comes up :)
So... I figured out how to add items to a pre-existing array. Following is the applicable script snippet: catch_array["privilegesID"] = []; // Declare a new associative key in the catch_array. catch_array.privilegesID.push(varPrivilegesID); // Add varPrivilegesID to catch_array, assign it to the associative key. console.log("data row After processing: " + JSON.stringify(catch_array)); It works great, except for one issue. When I run it to the console.log the added array items do not output the same
Cross Domain Ajax Get support for all IE versions
Hello, I desperately need to write the following script so that it works in all IE browsers, the following code works in all browsers except all IE versions. In IE no call is made to the PHP, is there an example of how I can do this? What is the standard way to do so? Thanks! $.get('http://somedomain.com/promo_getstate.php', { crossDomain : true, cache:false, email: emailaddress, country: 'DE', lang: lang,
Help getting custom vertical scroll bar in a frame.
Hello, Im creating a site and I dont want the whole page to scroll down, I just want a frame in the page to scroll and I need a custom srcoller. How is this done in jquery? Thank you
IE9 focus fails unless an extra line is added. Is this an IE9 bug or a jQuery bug?
I have a column of input fields that I validate for numbers only. If it's a NaN I want to display a message and refocus when the user tries to click away. The following code will fail in IE9 to refocus back to the offending value. But I had to insert (by pure accident) an extra random focus line to force it to focus correctly. Any ideas? <input type='text' class='unit' value=""/> $("input[class=unit]").change(function(){ if ( !isInt($(this).val()) || Number($(this).val())<0 ) { alert("Not an integer
jQuery push method?
Hello, Im getting an error in IE say that IE8 doesnt support the array.push() method. Is there a jQuery equivalent? Thanx
SOLVED: Load a XML file and work with it
Hello, first of all i tried to goolge for it but did not find a solution. (also searched the forum for it) here my problem: i have a XML file on my webserver (generated from php) here is an example of its content: (store it as generated.xml) <?xml version="1.0" encoding="UTF-8"?> <xml> <gallery> <title>sampleGallery</title> <folderName>sampleGallery</folderName> <paging>true</paging> <pageLimit>100</pageLimit> <pictures> <picture> <fileName>fileName</fileName> <title>title</title> <owner>owner</owner>
$(element).on('click', 'ajax_element', function(...)) Event on button click fires twice
Hello ppl, I need help with an on() click event that is fired twice after clicking an input type button. The HTML: <div class="msctreemain" id="msctreemain"> <input type="button" class="mscbtnscrolldown fRight" id="btn_navsubtree" dyn-param="someParam" dyn-param-1="someFurtherParam" /> </div> <div id="navsubtree" class="mscdisplaynone"></div> The script: $(document).ready(function() { $("div").on("click", "#btn_navsubtree", function(event) { var param = $(this).attr("dyn-param");
Problem with toggle function in jquery 1.9.1
When i use toggle for multiple clicks using the jquery 1.9.1 plugin, there is an error the code: $('a').toggle(function() { console.log('click1'); }, function() { console.log('click2'); }, function() { console.log('click3'); }) the error: Uncaught TypeError: Property 'function () { console.log('click2'); }' of object #<Object> is not a function If is use the same code using 1.8.3 it works fine, there may be a prodblem with the new plugin, just wanted you guys to check
attr jquery-1.9.1 in firefox 19.0.2 not work.
<link href="Content/themes/base/jquery-ui.css" title="base" rel="stylesheet" type="text/css" /> <link href="Content/themes/blitzer/jquery-ui.css" title="blitzer" rel="stylesheet" type="text/css" disabled="disabled" /> <link href="Content/themes/cupertino/jquery-ui.css" title="cupertino" rel="stylesheet" type="text/css" disabled="disabled" /> <link href="Content/themes/redmond/jquery-ui.css" title="redmond" rel="stylesheet" type="text/css" disabled="disabled" /> <script src="Scripts/jquery-1.9.1.js"
jQuery Slider with php/mysql contents
I'm new to jQuery & PHP stuff, & I really need help with this. Its been about a week now, that I've been trying to configure the jContent Slider on my website's dummy page: Index2 Now its getting the products from mysql & displaying correctly, but when I try to continue displaying products from the next slide, it just repeats those first 4 products (number of products depends on my requirement) from the next slide. I'm sure I'm doing some silly mistake & forgetting something, but I just need someone
Selecting within a set
I have more than one control of the same type, both containing 'xyz' in the middle of their IDs. I want to select an element within that set having an ID that ends with '123': <input type="text" id="Autostuff_gtuyn_xyz_more_ardohn_123"><br /> <input type="text" id="Autostuff_3yntu_xyz_more_hnardo_7"> I thought I had it with: var x = $("select[id*='xyz']").("[id$='123']").val(); but I get "Expected identifier...
Validation of range along with some alphabets in multirow form
I am very new to jquery, I have developed a php form to enter data. I want to restrict user from leaving the text field if he/she enters wrong value. Range :say 0 to 50 It should accept AB, NR as well.. Thanks, Mrs. Ujwala
why this click function still works
Hello all, I am new to this forum and also I don't have experience on jquery. I load a file after clicking in one div, I remove class when this click happen, but still if I click on this div execute to load the file. the script is <script type="text/javascript"> $(function(){ $(".up").addClass("votes"); $(".down").addClass("votes"); //<![CDATA[ $(".votes").click(function() { var id = $(this).attr("id"); var name = $(this).attr("name"); var data = 'name='+ name; var parent = $(this); if(id=='up'){
Tool for old jquery code to the newest versions 1.3.2 to 1.8.3?
Hello I have scripts old with 1.3.2 version of jquery. Is there a tool or program to transform old code to the new code. I need to be 1.8.3. Otherwise, it becomes conflict when i load both versions - the old one and the 1.8.3 for the current scripts. Thanks?
Having trouble controlling audio in subsequent divs
I'm having a really weird problem with stopping audio on my page. I have one overall container, then inside it are 3 pages, "page with no sound", page1main and page2main. The webpage initially only has links to the main pages ("page with no sound", page1main and page2main), not the subpages. Link to "page with no sound" always appears first in document. Page1main and page2main then has links to two sub-pages, page 1a, page 1b, page 2a, page 2b. Each subpage has an html5 audio element (test1a.mp3
Dynamic select list not posting value
JQuery 1.9.1 jQueryMobile 1.3.0 I am creating a mobile site for a Web site already in place. I am only very slightly familiar with jQuery, and I'm not a real slick JavaScript programmer either. As much as possible, I am writing this mobile site to utilize the server-side PHP code I have created on the main site. One of those routines processes freight delivery quotes. The user must enter an Origin and Destination zip code. When that zip code covers more than one city, the input changes, through an
Matching exactly option and optgroup
First all, I like to thanks kbwood for this awesome script, however, I got an issue with this script when my select-options become long: This is kbwood's solution with few options http://jsfiddle.net/hsQjh/5/ This is long options with issue: http://jsfiddle.net/hsQjh/6/ My first select-box option is up to 40+ of options, thus the second select-box would be up to 40+ of optgroup as well, when I picked option '2' on first box, second box are populated all optgroup that is numbered started with 2, which
Smooth glow for image on hover?
Is there a jQuery plugin that animates a smooth glow on the image itself (not a border/outer glow!) when mouse hovers over it? I've only found a CSS trick that animates a border glow, as well as Pixastic which does have an image glow but does not have a smooth animation that fades it in. Thanks.
.css("top") is returning "undefined"
Hi, I am trying to set the property of a DIV element using the .css(...) method, but it keeps returning "undefined" both before and after I set the value. Here is the code snippet: var isense = { $dialog: $('#isense'), $box: null, // gets set before call to ShowDialog ... ShowDialog: function (data) { var height = this.$box.height() + 9; var $offset = this.$box.offset(); var content = $('<div />').append($('#isensetemplate').tmpl(data)).html();
How to cancel click and hover actions?
I use the following statements: $("#icon09").hover(hoverYes, hoverNo); $("#iconimg09").click(intzorg); where iconimg09 is part of icon09. This works fine, but I want to retract the "hover" and "click" later on. Can anyone tell me how to do this?
$.ajax timeout, next request is err: "abc was not called"
Basically what I'm trying to do is: 1) make 1st a jsonp get request to a url This call may get 404 2) if the first call fails, make a jsonp get request to a different url If the first call fails due to timeout (404 error) then the second call fails with an error that the first call jsonpCallback ("abc") was not called. I don't understand how the first call could be effecting the second call. Here's some example code (it's more code than necessary but for clarity sake): var
getting a combobox value from database with json
hi mates!!! im a begginer in jquery and i have a big problem for me... i have a static combobox and i do a query to the database for get the genre and compare this value with the values of the combobox but the json value replace me the first value of the combobox an then the list of the combobox show me the same two values for example; my combobox look like that: <select name="sexoAlumno" id="sexoAlumno" > <option value="1">Masculino</option> <option value="2">Femenino</option>
Need help converting a table
This may not look long but I promise this is not for the lighthearted I have the following table I am trying to modify via jquery... <table id="mtable" cellspacing="0" cellpadding="0" border="0" style="width:100%;border-collapse:collapse;"> <tbody><tr> <td> <span id="mspan" class="merror"></span> <table width="100%"> <tbody><tr> <td nowrap="nowrap">User name:</td> <td width="100%"><input name="mname" type="text" id="mname" autocomplete="off"
jCarouselLite beforeStart .stop ?
I am using http://www.gmarwaha.com/jquery/jcarousellite/ with Non-image Content with 1 visible item to make a survey. In the beforeStart, I do some validation, and I would like to abort the animation if it fails validation. A sweet "return false" from beforeStart was what I was expecting in the hopes to not even execute afterEnd. I initialize with anyClass $(".anyClass").jCarouselLite({ ... beforeStart: function(b, direction){ ... If .stop( [clearQueue ] [, jumpToEnd ] ) is the way, how do I use
How to call a .cfc using jQuery?
I'm trying to create and call a cold fusion component(.cfc) file and use jquery to pass my query info. Am i doing this correctly in Coldfusion7. Everytime i click the Finalize button nothing happens and I'm not sure what I'm doing wrong. How do I fix this? The following is in form.cfm: <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://code.jquery.com/jquery-migrate-1.1.0.js"></script> <script language="javascript" type="text/javascript"> function aalidateFunding(awardTotals){
Weird iOS bug for html() first time only?
Hi, I am currently working on an iOS app using phonegap to build. My pages are loaded via AJAX into a #wrapper_block div, which is where I hold the contents. I have the following code in my function, which seems to break in iOS 5 (not sure about iOS6); alert("test 5?"); $('#wrapper_block').html(new_data); // this breaks alert("test 6?"); "test 6" doesn't show up, but when you press the same link again - it works perfectly! (and gets there fine) If I change the html() part
Jquery not working in Chrome and Internet Explorer
I'm working on a Wordpress theme. On the header I check if this is the first visit (the user just entered the website). If this is the first visit, an animation appears. Animation = a sidebar appears in the middle of the page, in some miliseconds it opens and the page appears. In the code, ub_sb_closed_on_hp is an option that sets only the sidebar to appear for the home page. It works under Mozilla, but it doesn't work under Internet Explorer and Chrome. On IE and Chrome the animation appears on
Next Page