keypress event -> keyCode attribute obsolete?
Hi, the documention on keypress states that "jQuery normalizes the .which attribute so we can reliably use it to retrieve the character code". Does this mean that the .keyCode attribute is basically obsolete? I ask because I find a lot of code on the web where both attributes are used within an if clause, as if it was necessary to check both values. Even this very entry (keypress) of the jQuery API Docs has .keyCode in the example. Why is that? Thanks -Martin
Ajax() not sending data
Hi, I'm new to JQuery and a bit iffy on some of the syntax, which I think may be the source of my problem: The php file that processes the data being sent is working properly as I've tested it independently. Everything else is working also - except that the data (in 6) is not being sent, as returndata in 7 is empty. I'd appreciate any help. $(document).ready(function() { // generate markup in cells $(".addBK").append("<a href='#' title='Bookmark this page!'>Bookmark!</a> ");
'Swizec styled buttons' - implementing?
Hey, Firstly, I'm extremely new to jQuery (after messing around with HTML and CSS for a couple of years) so please forgive me if this is a stupid request. I'm trying to place these buttons: http://swizec.com/code/styledButton/ into my website. I've downloaded jquery and saved it as js/jquery.js I've downloaded the 'styledButton plugin' and the 'styledButton CSS' files and saved them both. I think I need to cut and paste the code at the bottom of the link above into my page (similar to the example
Auto adding .active class to menu
Hi guys, I'm still new to jQuery, but with your help I can get things working :D Now, I'm stuggeling with this: I'm trying to add .active class to a menu, based on the URI. It works with URL's like: /, /products, /about, /contact but not anymore when you go to /products/some-product. I know what's wrong, but I can't find a working solution. I've tried a regex, but that didn't work either... Thx in advance! The code: $(function() { var path = location.pathname;
.load - works with FF, but not with Chrome?
Hi, I've been trying to load some tags using .load. I was testing with Chrome and never got any results back - I just tried the same code with Firefox and it works - where's the problem ? Am I doing something "almost" correct, that firefox allows and chrome doesn't? I cannot see any errors in the console either Here's the line: $("#somediv").load("somepage.html #someotherdiv");Thanks!
How to pass a dynamic DIV ID to a function in JQuery
Hi all, I got a problem with passing dynamic DIV ID. I was doing some a php page which retrieved data from database and put into according DIV tag like this: <DIV id="variabl1">msg1</td>; Since there were tens of records in the table in database, the result would become: <DIV id="variabl1">msg1</td>; <DIV id="variabl2">msg2</td>; ... <DIV id="variabl100">msg100</td>; I got a JQuery script to show a specific message when a user moved his mouse over a DIV, say if he moved his mouse over DIV ID 1, a
Not Selector & IE
Why doesn't the :not() selector work in IE 6 or 7. Especially for html tags which don't normally use the css :hover selector (e.g. table rows). $("tr:not([href])").attr('style','background: black;'); Anyone?
Chat application using jquery and php
Hello, Can you point me to a sample where someone has developed a chat application using jquery. If no sample is available, can you please tell me how should I go about writing my own?
Dialog Widget
I am attempting to use the Dialog widget in VS2008 utilizing a masterpage and a child form that needs to call the dialog box to appear on a asp button click event and close after processing a call to a .dll that generates a report. Anyone know how to configure?
Click button add to a counter...
For some reason this won't work: $(document).ready(function(){ var month = 0; $("#backMonth").live('click',function(event){ month-=1; }); $("#nextMonth").live('click',function(event){ month+=1; }); });When I alert the variable month, it tells me it's 0. Why?
prevent action to be executed before it starts
Hello @all, hopefully anybody can help me with my small problem. I am building a navigation which animates width on mouseover and revert it on mouseleave. That navigation also supports keypress/keydown actions, so it behaves like you hover with the mouse and additionally opens the submenu too. My problem is, when using the keydown (C) function, the menu opens up perfectly but when I mouseover then, it fires the 1. function and behaves like it should, it closes. I tried to stop that when just using
Open dialog on a single click?
I have the following code, however, I need to click twice on Change password for the dialog to open. I want the dialog to open when on a single click. I can`t understand why the dialog doesn`t open on a single click. <td><a href="#" id="password_link" onclick="$(ChangeAttribute('<%= item.Name %>', '<%=item.ID %>'));">Change Password</a> </td> function ChangeAttribute(name, Id) { $("#ID").val(Id); $("#DivPassword") .dialog('open'); $('a.ui-dialog-titlebar-close').remove(); $('#DivPassword').dialog({
strip out a backslash / from <img>-tag
Hello @ all, woundering if it could be possible to strip out a backslash / from <img>-tag ? I have that code rendered: <img src="/images/content/img_ad_listing_basic_summary_enus.gif" alt="">I would need to strip out the first slash from src= like that: <img src="images/content/img_ad_listing_basic_summary_enus.gif" alt="">Would be geat if somebody could hit my head on that Kindly regards, Dan
add dropdown list inside div
Hello eveybody.... I'm newbe on this JQuery that someone suggested me to use yesterday... so it's just one day.. :).. So i'd like to have a help about something... I have, inside a wrapper a rectangular div where in the middle there is an image.. now the idea is that when i click the image the inside of this div change and the inside divides itself in two other div, the upper one where i should put a dropdown list (with things inside), and a lower div where should be appear the results of a db...
site skeleton
I was wondering... is there a jQuery based simple site skeleton ? I don't need a fool blown CMS, such as Joomla, my web site will have only a few pages and a simple navigation menu, yet I do want it to look as professional as possible. It does not have to be very unique either... Any suggestions ?
.scrollTo using on body
Hello everyone, i'm just starting with jquery. I'm trying to get the page to scroll 100% to the right when someone clicks the 'click me' link. Here is my html below. Normally i would put java and css in an external file, but this is simpeler now. Here is my html: <!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"
Jquery - Animate a graph
Hi I am new to jQuery and am loving the write less do more approach. I was looking to create a simple bar chart based on form results (without plug ins) each bar will be an empty div with css values proving the dimensions. I wanted to animate the height of these bars using the css height property using values from a form. The instead of animating up, the bars animate down from the top. I appreciate this may be more of a CSS question but would appreciate any views?
Lifestream Equivalent, jQuery for Streaming Multiple Data Sources?
Hi, I'm developing my personal portfolio site (which is non-wordpress), and I'm looking for a plugin or something similar that lets me stream multiple data sources into a content area. Basically something like Lifestream, but obviously something non-wordpress. I'm looking to stream: Twitter, Wordpress, Last.FM, Soundcloud (if possible). Also, this is going to be in a tabbed (assumedly AJAX) content area that can be hidden at times. Any help is greatly appreciated. Thanks.
jQuery selector
I'm fairly new to jquery. What will be the outcome of $("strong + em") and $("p ~ ul"). Any example code would be greatly appreciated. Thanks.
Using jquery for a very simple database updater, but with a tiny dash of CRM in there?
I've been googling around for a really simple way of making what is, in effect, nothing more than an enhanced phpMySql interface. In a mysql database, I have: Name, address, phone, website etc, plus 2 or 3 custom fields. This data is pulled out to make a website. All I want is to be able to make a freeform form, a bit like Access, but for the web, and the only thing I want to do over and above normal field editing would be to have a list of when I contact them, what was said, and perhaps a reminder
Backing up set to get those not previously selected
I'm sure this is simple. Consider: <div> <div id="goodpage1"> </div> <div id="goodpage2"> </div> ... <div id="badpage1"> </div> <div id="badpage2"> </div> ... </div>I wish to show the good pages and hide the bad pages. Can I get a set of those with 'good' in the id, show them, then somehow get a set of the elements that weren't showed so I can hide them, or must I now explicitly search for those with 'bad' in the id (or not 'good')?
add/remove div object using select menu
Hello everyone, I'm beginner in jQuery and trying to write "add/remove div object" script. I found on web some examples how to do it but... there's two problems. Firstly I want to add some DIV when user choose any value from select list html object (http://www.w3schools.com/TAGS/tag_select.asp) - and absolutely don't know how to do it... :( Secondly - every new DIV object created by select list from html must have (inside of this div) something like "remove me link" which of course should deleted
Table: foreach TR - synchronous
Hello, As you can see in attachment, I have an original table which should be manipulated by jquery. I worry that I cannot find a way to run a for-loop synchronously instead of $("...").each(function... which is asynchronous :-( What I want to do: If there are <td><span>s in the 2nd column that are empty, then the upper TD with a non-empty span might have a rowspan to "overlap" the empty ones. It's a bit odd to describe, but the attached HTML shows easily what I am trying to explain... With a for-loop
superfish menu
I wonder if i can get help im using superfish menu in my website, have a problem that the menu sub items when it open it is behind what is written in the page (please find the attached image for clarification; like what is happening with landlord services sub items), how can i make it appear in the front and anything else to be behind? Also i click on a menu item and it navigates to the relevant article, the item colour change to grey as shown in the picture as well but the grey colour is not
Implementing Dialog Widget in VS2008 Masterpage and Child Form
I am attempting to use the Dialog widget in VS2008 utilizing a masterpage and a child form that needs to call the dialog box to appear on a asp button click event and close after processing a call to a .dll that generates a report. Anyone know how to configure?
speed
im not a coder...just trying to understand, I assume there is good and bad ways to use jquery (and/or ajax). is it true that if i have a spec and hire a coder to implement it, the speed with which the site performs will be directly related to the coders skill level. or is it - "it either works or does not work and if it works it will always be the same speed
Checkbox click event seems to not work
Hello to Everyone. First sorry for my English. I'll try write my problem clear as possible. I was searching for my problem but I didn't find any solution, I hava a checkbox in every row on table. I want to change state of cb by clicking on row and on cb too. But when I add event to row, I can't change state of cb by clicking directly on it. Only click on row, outside the cb area work. In addition, I cannot invoke event on any elements inside that row, anchors, etc. My code: $('tbody > tr').click(function()
AJAX Multiple Select dropdowns
I'm looking for a jQuery AJAX plugin that allows me to do the following. I have three dropdowns ( Make, Model, Year), the values of the second and third dropdowns need to dynamically changed based on the selection of the previous dropdown. Example: Dropdown 1 Dropdown 2 ( would change depending on selection in dropdown 1 ) Dropdown 3 ( would change depending on selection in dropdown 2 ) Is there an existing plugin that works? or can anyone lead me in the right direction? Thanks,
Learn jQuery without knowing Javascript?
I don't know Javascript, but I'm only interested in using jQuery. Does it make sense to find a beginner jQuery book and use that to learn Javascript/jQuery?
problems with dialog events
Hey I am trying to use drag and dragStop on a dialog. But somehow the mousemove event of the drag is not being terminated. Can anyone see what I'm doing wrong? Basically I'm defining an area to the left of the screen, that when hovering a wire should be drawn (represented by a div). When moving away from that area, the wire should disappear. That part works, but after i drop the dialog, and the dragStop is executed (I can see it happening because of the alert in dropDialog function), the hovering
hover div swap
Hi, I am new to jQuery and need some help that might be very simple. I have a container div that holds two inner divs - one that has text and another that has an image. The image div is hidden on start. I want to write a function that will change the text div to the image div on mouse over and that will change back the image div to the text one on mouse out. I tried using the replace with function but couldn't make it work. here is the html: <div id="container"> <div id="textdiv">some text</div>
Fixing my jQuery Menu
Hello guys. I'm kind of new to jQuery. I have an accordion style multi level menu.. the first submenu level seems fine.. but when it comes to 2nd and 3rd sub menu levels.. i want to achieve a horizontal drop menu.. is this possible? If you want to see what i did.. you can refer here : http://www.socialnetworkperformance.com/tsuyoshi/joomla I'm looking forwards to your response. Please help me :D Thank You !! :D
javascript
why using the Window.onDomReady function in javascripit?
Can this code be made to automatically switch images?
Here is the loader code: jQuery('#loader').hide(); // DOM ready jQuery(function () { //alert('test'); jQuery('#showcase li a').click( function(){ jQuery('#loader').show(); jQuery('#featured').load(function () { jQuery('#loader').hide(); return; }).error(function () { alert("Failed to load image"); }).attr('src', this.href); var linkout = jQuery(this).attr('rel'); //alert(linkout); jQuery('#featured-link').attr('href',linkout);
Not a rhetorical question: Why are JQuery.com and JQueryUI.com no longer coming up in non-IE browsers?
Does anyone else have the problem the JQuery.com and JQueryUI.com no longer come up easily in any non-IE browser? They may eventually come up, but usually I get a connection-reset non-conection in Firefox, Safari, and Opera, at least the first several times. This is since the beginning of the year, literally since January (my first question to a colleague was on January 28th). I'm not looking for paranoid conspiracy theories, I'm geuinely wondering what's up.
Newbie question - overlays I guess
Hello I've been playing with jQuery for about a month now and have gotten various addordian panels to work as well as the obligatory tool tips and modal boxes. For my next trick I wanted to see how to get an expanding panel setup link the one at the bottom of this page. Click the button that saus "I need to +" and the organge panel/window that expands. Is there a generic term for these and can anyone lead me to a resource that talks about these in their simplest form? http://www.imulus.com/portfolio
Making sense of jQuery/Prototype debates
So for a research topic at school, I chose to do web development software trends, to see if there are any general commonalities. One sub-topic I chose to do was Javascript, and where it seems to be heading. After reading a bit about it (I'm very new to web development), I learned that jQuery and Prototype seemed to be the most popular options when using javascript, but I didn't understand why they are compared against each other so often. If jQuery is a library, and Prototype is a framework, why
Newbie question
Hi all, i created 2 divs, and for each div set a different background pic, using CSS now i want to fade those divs opacity to 0.4 and when mouse over to increase the opacity to 1, and when mouse leave to decease it to 0.4 back. my jquery code is the follow: <div id="dj1"></div> <div id="dj2"></div> $(document).ready(function () { $("#dj1").fadeTo(400, 0.4); $("#dj2").fadeTo(400, 0.4); $("#dj1").mouseover(function () { $("#dj1").fadeTo(400, 1); }); $("#dj1").mouseleave(function
Problem with Ajax
Hi, I'm rookie when it comes to Ajax and jQuery and needs some help... The following url produces an xml-file that I want to use on my page: http://ws.spotify.com/search/1/track?q=foo When I use firebug it seems like nothing comes back. What have I done wrong? This is what my code looks like: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title>
Document ready problem - Showing hidden content briefly on page load
Hi, I have this in the head: <script type="text/javascript" src="/scripts/jquery-1.3.2.min.js"></script> <script type="text/javascript" > $(document).ready(function() { $('p#adminButts').hide(); $('a#showHide').toggle(function() { $('p#adminButts').slideDown('slow'); },function(){ $('p#adminButts').slideUp('fast'); }); }); </script> and in the body: <a id="showHide" href="#"> Show/Hide
Next Page