mousedown - NO SIGN.....
Why do I get a NO SIGN (IE8 and FF) when I mousedown to drag this??? Once you mouseup, you can drag it around without the NO SIGN.... <!DOCTYPE html> <html> <head> <script src="jquery-1.4.1.min.js"></script> </head> <img id="test" src="controlHANDLE.png" style="position:relative;"> <script> $(function() { var testLISTENER; $("#test").mousedown(function(e) { controlLISTENER = function(e) { var x = e.pageX; var y = e.pageY; $("#test").css({ 'left'
Is it possible to make a sortable/draggable portlet that includes a menu and/or a close/remove button?
I'd like to be able to create a set of portlets that have menus at the top of each of them. Ultimately, I'm looking to make something like the iGoogle gadget interface, of moveable windows that display some basic info. I've seen the portlets demo at the link below, but can't see an obvious way to customise them. http://jqueryui.com/demos/sortable/#portlets Can anyone tell me if this is possible with jQuery or jQuery UI, and point me in the right direction for a bit of further info? Your help will
Trouble initializing datepicker in dynamically added table rows...
Hello folks, The project I'm working on is immensely important in the medical world of claims and insurance. The onus is on me to deliver a top notch product with excellent scripting logic. I stumbled onto jQuery a few months back and it has literally saved us tons of work. Thank you, jQuery team. Now to my problem. I'm using clone() to insert a new row dynamically in a table. Ex $("#table tbody tr:last").clone(true).insertAfter("#table tbody tr:last"); One of the columns has a datepicker, specifically
I need some urgent help hear, thanks!
I am trying to get jquery to work on a form I have on a usercontrol . My web application has a masterpage, The current page I am working on has several forms which are on usercontrols loaded onto the parent page by the click of a menu control option,which then loads the required form contained on a usercontrol dynamically via a place holder located on the parent page.The placeholder is itself placed in an ajax update panel control. Below is how I have tried to register the jquery datepicker on one
Trouble downloading jQuery...
Hello, I'm new to jQuery and I'm having trouble with downloading it (much to my embarrassment!). When I click on the 'download' button on the JQuery home page, a whole load of Jquery gets opened up in my browser window, rather than 'downloading' to the mentioned zip file somewhere on my computer. I'm running OSX (10.6.2) and have tried downloading it via Firefox and Safari. Is there something stupid I'm doing or not doing? I'd be very grateful for any suggestions.... Many thanks, Rockstar79
Jquery post method on the form?
Hello all, I am using jquery with simple Asp.net application.I am having an registration form in which there are two buttons. One register and another unregister,on the unregister button a different panel gets opened. I have written validations in the js file made for registration page.and included that on the register .aspx page How shall i call only one button in the post method written in js file. Please tell how shall I do this Thanks ritzkapoor
Can I duplicate this effect with jQuery?
Hi, I'm new to jQuery and I'm looking for some help. I want to know if there's a way to duplicate the flash effect on the website at http://www.virtualpbx.com/. I'm not interested in the animated bird but I want to use the expanding block effect on my site. The blocks expand upon page load to reveal subjects. Hovering over them causes them to expand with more text. Hovering out and they contract to their original size. I'd like to duplicate this effect exactly if possible. Can anyone point a noob
animated menu problem
Hi i want to make an animation menu and i have a problem: when i hover the submenu buttons they dissapear. m1=buttons id pag=submenu photo id inceput= submenu buttons id so here's the code: $(document).ready(function () { $("#m1").hover(function(){ $("#pag").stop().animate( {width:"450px"}, {duration:500}) $('#inceput').show("normal"); },function(){ $("#pag").stop().animate( {width:"0px"}, {duration:500}) $('#inceput').hide("normal"); })
Replacing if statement with regular expression
Is it possible to replace an if statement like this: if(arr[i].innerHTML == "(3) Low") { arr[i].innerHTML = getImage("KPIDefault-0", "Low Priority"); } else if(arr[i].innerHTML == "(2) Normal") { arr[i].innerHTML = getImage("KPIDefault-1", "Normal Priority"); } else if(arr[i].innerHTML == "(1) High") { arr[i].innerHTML = getImage("KPIDefault-2", "High Priority"); } With a regular expression if statement like this: if(arr[i].innerHTML.text.match(/^\(\d\)\s\w/)) { arr[i].innerHTML =
Hi! i'm having problem while assigning variable to the id attribute of an input.
My task is to disable input with the id identical to the name attribute of the other input. Here is the code: $("input[class='yes']").click(function() { var x = $(this).attr("name"); $("input[id=x]").attr('disabled', true); }); Help me, please, to figure out how to assign variable 'x' to the id attribute.
Best way to structure my objects and functions
Hi, I am building a fairly complex thing which revolves around a floating "inspector" on the screen. This inspector has various associated methods such as hide(), show(), initialise(), loadObject() etc I am a bit confused about how I should be structuring my code. Should I use: var inspector = function() { this.methodOne = function() {}; this.methodTwo = function() {}; // etc}or inspector(); function inspector() { this.methodOne = function() {}; this.methodTwo = function() {};
How do I use jQuery to animate a drop menu?
Hi all. I am new to scripting and I'm trying to avoid using Flash for this because it is quite simple... I want to animate an existing CSS drop menu, here's the test site . I need the sub-menu to slide out nicely below, and I'd also like to fade the hover effect on all the links in the menu. I know this can be done with a small piece of code but I wouldn't know where to start, also I'm not sure how to slip it in amongst my existing script... Which, by the way, I would be glad to find a lightweight
Hawtness videos for download?
The hawtness videos are great but (and I don't know why) I've only been able to watch the first 3 all the way through. The others all stall for me about 30 secs in. I'm intrigued by what the rest contain and I'm wondering if they'll appear in some download-able format at some point. Brilliant work by the way and thank you.
jQuery datepicker in drupal 6.15. how to change languege?
Hi, I'm trying to build webpage using jQuery datepicker in drupal, but i'm stuck with localization. I know that datepicker has translated to Finnish but i'm not able to get it working. Can you guys point me what i'm doing wrong. I remove < tags so filter doesen't filter my code away. :) And i havent never use java before. link type="text/css" href="css/themename/jquery-ui-1.7.1.custom.css" rel="Stylesheet" /> script type="text/javascript" src="js/jquery-1.3.2.min.js" script type="text/javascript"
Display "filename" in to title attribute or into caption.
So I'm just starting to piece together how to use jQuery and I'm in the middle of putting a web gallery together that uses FancyBox as the tool to overlay images. However I'm also using a PHP script to populate the page with thumbnail images from a folder and linking them to their corresponding larger image versions. What my goal is; is to have the jQuery script use the filename of the large image version as a caption when the image is overlaid. How would I go about adding those few lines of code?
JQuery not working on remote machines
Hello, I am new to jQuery. I have written my application in a VMWare applicance running linux and php. Code is pretty simple. <html> <head> <script src="jquery-1.4.1.js" /> <script> function setup_country_change() { $('#countries').change(update_cities); } function update_cities() { var countryVar=$('#countries').attr('value'); $.get('get_cities.php?country=' + countryVar, show_cities) } function show_cities(res) { $('#cities').html(res); } $(document).ready(setup_country_change); </script>
.each() on Chrome? What an headache!
Hi guys, I'm encountering an issue that looks like is related to Chrome js engine. I am retrieving data with $.getJSON and I get back an unknown size object with unknown properties (like I suppose most of the asynchronous requests). As you probably know, Chrome loops through elements (when you use for..in) in index order instead of input order. The same does the .each() function of jQuery. Is there any workaround you can see? Thank you! Enrico Simonetti
Having problem closing off
Hi Hoping someone can help me please. I'm very very new to jquery and i am trying to get this to work. jQuery(function($) { $(this).hover(function(){ $(pth).attr("src",pth.src.replace(/.gif/g,'_active.gif'));// mouse over Image },function(){ $(pth).attr("src",pth.src.replace(/_active.gif/g,'.gif')); }); }); $('#slideshow').slideshow({ timeout: 5000, fadetime:2000,
Simple Loop Problem (new to Javascript)
I have to populate a number of dropdown lists. I have a function that works, and I'd like to loop through it several times in order to populate the lists. Assuming that my dropdown lists have ids of color1, color2, etc, can someone tell me what is wrong with the function below? function dropdownlist(listindex) { var i=0; for (i=0;i<=5;i++) { document.form.color+i+.options.length = 0; switch (listindex) { case "3.86" : document.form.color+i+.options[0]=new
How to stop page elements from moving after calling the hide() method.
I have just started using jquery and have an embarrising simple question. When i call the hide method how do i stop other page elements from moving. In the example below when i hide the control div. the three links move up the screen. Does anyone know how to solve this? Thanks <html> <head> <script type="text/javascript" src="jquery-1.4.1.js"></script> <SCRIPT language="JavaScript"> $(document).ready(function() {SetUpEvents();}); function SetUpEvents() { $('#hide').click(function(){Hide();});
Better way to do this with jQuery?
I started experimenting with jQuery a few weeks ago and haven't really done much with it. Now, I have to code a simple product page which displays a product with variations and allows the user/customer to view the price and availability of the different variations (size/color combinations). I have a non-jQuery page that I created before that does about what I need, but there is a significant amount of javascript code and I want to see if I can trim it down by rewriting it using jQuery. The problem
I need it to do something I can't find.
Ok, so before I ask the question, I am a newbie. i have designed sites for about 10 years on a personal level using only html and photoshop... more of a graphic designer than web designer. I decided to get into web design more so been learning css for about a week and a half now. Getting pretty comfortable with it. But in talking to some friends about a problem I have they suggested jQuery, and it's blowing my mind! The closet thing to what I need is a shopping cart, i currently don't need it to
Booking system - Calendar
Hello, I'm new to the forums of jQuery. So hello! In the past i used jquery a lot for building websites with cool animated menu's and popups and validation for forms. So i'm not really new in the scene. Currently i'm working on a booking system for house rental. A calendar script is to complicated for me to write it on my own, so i searched the plugins and found some interesting calendar plugins(UI, Filament group calendar and overset multiday picker). The problem is the guest on the website are
How I can hide this text box
Hello! This is my code: <!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>Untitled Document</title> <style type="text/css"> ul { list-style-type: none; padding: 5; } div#box { width: 800px; height: 500px; margin-left: -100px; margin-top: -35px; position: absolute; left: 20%; top: 10%; border-width:
jquery and google analytics
hi, i am trying to track outgoing link with jquery and google analytics but i t does not seem to work. jquery.js is located in my "public html folder were my index.html is located. i have added the followin lines to the code: <!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>abcdefg </title> <link href="css/style.css"
How does Mashable do it?
I'll refrain from posting a URL, but on Mashable's site, in their post pages (not the home page), there's a floating widget to the left of the content that descends as you scroll down below the fold, but doesn't ascend above a certain point. I'd love to replicate this, but their site is so clogged with code that I'm having a really hard time parsing apart the (javascript) scripting that's controlling this. Thoughts or any help identifying the moving parts?
Combobox -Default value
Hi! if i have combo box like: <select> <option value="a" selected>asp</option> <option value="c">c</option> <option value="cpp">c++</option> <option value="cf">coldfusion</option> <option value="g">groovy</option> <option value="h">haskell</option> <option value="j">java</option> <option value="js">javascript</option> <option value="p1">pearl</option> <option value="p2">php</option> <option value="p3">python</option>
I need to exicute the function only once
Right now I have 3 <a> tags <li><a href="#" class="as"> Search </a></li> <li><a href="#"> Lookup </a></li> <li><a href="#"> drop </a></li> What I want is when the user clicks on search I want to display searchdiv which is <div id="searchDiv" class="searchDiv" style="display:none" > <br /> <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox> <br /> <asp:Button ID="btnSearch" runat="server" Text="Search" Width="58px" /> </div> so I wrote <script type="text/javascript"> $(function() { // alert("Hi");
How can I apply hide(), show() to an <option> in a <select>?
Hello, I would like to hide and show one or several <option> elements in a <select> element, under both IE 7 (or probably above), and Firefox 3. My elements are : <select name="source"> <option value="A">A</option> <option value="B">B</option> </select> But I cannot hide option with such a call (neither in IE 7 nor in Firefox 3.5.7): $("select[name='source'] option[value='A']").hide(); Would you please tell me what goes wrong? Thanks.
iButton event handler question
how an event handler works if a plugin has an option like: click: null to get a function of href ? lets say like $(document).ready(function (){ $(":radio").iButton(click: null); }); how to write href target on that click function ?
Getting Variable Value Outiside $.get() Function
Is there any way to access a variable assigned in a $.get() outside of the get function Code: var someVariable = null; $.get(url, function (data){ someVariable = data; alert (someVariable);// alerts data value }); alert (someVariable);// alerts null Benson Njonjo Web Developer http://www.verviant.com http://www.verviant.com/portfolio
How to capture the Keypress count
I have a textarea that limits the input to 300 characters. I want to capture the keypress count and show the user how many characters they used of the 300 ie "You have used 150 of 300 characters". I found some code to capture the keypress count, but don't know how to set the character count in a separate text input box. I tried to use the val function to set the value, but it takes only a string. Thanks for any help. Tom $(document).ready(function() { $('#info').keypress(function()
Using jQuery to validate a password field
Hi all, I'm sure this is going to be a ridiculous question. But I'm stuck and I can't get my second javascript file to do anything. The html looks something like this: <script type="text/javascript" src="/js/jquery-uncompressed.js"></script> <script type="text/javascript" src="/js/jscript.js"></script> jquery-uncompressed.js is the jquery file and jscript.js is my own external file here is the script in jscript.js : $("input#UserPasswordVerify").change(function() { if ($("input#UserPasswordVerify").value
jquery tabs with hover and rotate
Trying to use tabs to automatically rotate and if a tab is hovered over to stop the rotation and select the specified tab and then go back to rotation after mouseover ends. $(document).ready(function(){ $('#banner').tabs({ fx: { opacity: 'toggle' } }).tabs('rotate', 3000); $('#banner').hover(function(){ $(this).tabs().tabs('rotate', 0, false); var $tabs = $('#banner').tabs(); var selected = $tabs.tabs('option', 'selected'); $tabs.tabs('select',
response data sent from servlet are not received on return of an Ajax form submit
Hello, I coded a simple Servlet and jsp to learn jQuery Ajax Form submit facility. I used Netbeans to trace the execution of the code. I am sure that the Servlet does send out data as http response. However, the data are not received by the client js code. I don't know why. And, it is very strange that the alert() dialog pops up before the servlet sends out the data completely. Can anyone help me identify the errors? *** my servlet code (see below) *** ... public class handlerServlet extends
About Select:Selected selector
Hello, I have this script: $(document).ready(function(){ jQuery("select[name='type']").change( function() { if (jQuery("select[name='type']:selected").val() == "Par" ) { jQuery("#nom").rules("add", "required"); jQuery("#prenom").rules("add", "required"); jQuery("#particulier").show(); jQuery("#professionnel").hide(); } else { /*jQuery("#whathelp").rules("remove", "required");*/ jQuery("#entreprise").rules("add", "required"); jQuery("#professionnel").show(); jQuery("#particulier").hide(); } }); })I
Slideshow + list picker
I've used jQuery plugins before, but I am still a beginner with javascript and have a difficult time writing anything from scratch. I'm working on a page that has a div with an image background. Underneath it is a ul that contains a navbar (css sprites) that, when clicked, should swap the image background of the div above (with a fade). To complicate matters, I need to have the image div automatically cycling though the images until the user clicks a nav button to go to a specific slide. I've found
Crossfade an image
Hi, first time using jquery..or an javascript library for that matter.. say I have an image: <img id="imgchanger" src="images/1.jpg" /> I want to cross fade this img to ‘images/2.jpg’..How can I do that with jquery? thanks!
JQUERY in .NET 1.1 ??? loding message...
Hello, I am a newbie to JQUERY.. I want to use it in .NET 1.1 application. When a button is clicked it takes long time to populate the results on to my control .. I want to show " loading ..please wait" message to the user.. How can I achieve this ??
JQuery Menus on iFrame
Hello, I recently found a neat menu that uses jQuery. It works just fine normally, however , I have a page that has a iFrame inside the pages main DIV. After going to this page, the menu no longer shows up. I can see it trying to show up, but it ends up being behind the iFrame. Is there a way to get the menu to show over the iframe? Or perhaps you can recommend a better menu system that will work like i need it to?
Next Page