I've made a page that uses jQuery to allow you to place <div>s on the page based on your mouse coordinates when you click.
The page
And here's the javascript:
$('document').ready(function() {
$("#canvas").click(function(e){
var x = e.pageX - this.offsetLeft;
var y = e.pageY - this.offsetTop;
$(document.createElement('d...
I am trying to create a glossary system which will get a list of common words and their definitions via ajax, then replace any occurrence of that word in certain elements (those with the useGlossary class) with a link to the full definition and provide a short definition on mouse hover. The way I am doing it works, but for large pages i...
Hi,
Basically what I have here is a button that adds a new list item to an unordered list. Within this list item is a dropdown box (.formSelector) that when changed triggers an ajax call to get the values for another dropdown box (.fieldSelector) in the same list item.
The problem is on this line:
$(this).closest(".fieldSelector").app...
In the vernacular, scope and context have a lot in common. Which is why I get confused when I read references to both, such as in the quote below from an article on closures:
Scope refers to where variables and functions are accessible, and in what context it is being executed. (@robertnyman)
As far as I can tell, context is just ...
I need to use ajax feature to load an external div element (an external jsp file) into the current page. That JSP page contains a dynamic content - e.g. content that is based on values received from the current session.
I solved this problem somehow, but I'm in doubt because I think that my solution is bad , or maybe there is bette...
I have a generated HTML file which has large blocks of text with span's sprinkled throughout it with generated class names:
This <span class="21232">an example</span> of what <span class="332423">
I'm talking</span> about. There are span's with <span class="21232"> generated
ID's </span>.
Now, what I'm seeking to do, is if I hover ov...
I have the following if/else on another form and it works perfectly. I've now put it on a form which shows as a jquery dialog. Every alert along the way shows the correct assignment, but when the dialog opens, neither button is selected.
$("#create-company").click(function() {
alert($('#primary_company').val().leng...
Hi,
I've downloaded the fullCalendar package and included the jquery.js file and the calendar works, but when I try to open a jquery dialog, it won't open!
I've downloaded the jquery package from jquery.com and included the js from there instead.
Now the dialog works but not the calendar!
What am I doing wrong?
All the jquery files a...
I have jQuery that drops a menu down when its parent is clicked on, and dismisses it when they hover away from the menu. I am wanting to change the behavior so that it only dismisses if they click somewhere else on the page, or a different menu. Is this possible?
jQuery.fn.dropdown = function () {
return this.each(function () {
...
I'm fairly new to web development, so please pardon the painfully newbie question that's about to follow.
My computer science class group and I are developing a web application for class, which is built in Python (under Django) and uses jQuery on the front end. It's primarily an Ajax-ified application, and passing data from the backend ...
I've been googling around for a really simple way of making what is, in effect, nothing more than an enhanced phpMySql.
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 w...
I am getting a weird error. I can see images in slideshow, lightbox, etc. in Firefox and Chrome but in Internet Explorer 8 there are no images. Something is wrong with JavaScript/jQuery I think.
I am using jQuery 1.4.2,
jquery.flow.1.2.min.js
jquery.bgpos.js
jquery.easing.1.3.js
jquery.lightbox-0.5.min.js
jquery.validate.js
cufon-yui....
When the user refreshes the page, defaultView() is called, which loads some UI elements. $.address.change() should execute when defaultView() has finished, but this doesn't happen all the time. $.address.change() cannot be in the success: callback, as it's used by the application to track URL changes.
defaultView();
function defaultVie...
My website currently uses a custom jQuery gallery system that I've developed... it works well, but I want to add one capability that I can't seem to figure out. I want the user to, instead of having to click each thumbnail, also be able to click the full image itself to advance in the gallery. Working gallery is here: http://www.studioim...
Hello,
I am using Jquery Date pickers to get Start and End Dates for an application I am building.
I have two datepickers, one for a start date and one for an end date.
When someone clicks a date in the start date picker I need that date to be appended automatically to the end date picker.
I also need the end date picker to select fu...
I recently got some help on here from SLaks (thank you) on the behavior of my custom gallery. I'm now trying to fix the way the thumbnails function. I've been toying with it for about an hour but I can't get it to work. Live version of the code: http://www.studioimbrue.com . Currently the code is as follows:
$('.thumbscontainer ul li a'...
I asked for help earlier on Stackoverflow involving highlighting spans with the same Class when a mouse hovers over any Span with that same Class.
It is working great:
http://stackoverflow.com/questions/2709686/how-can-i-add-a-border-to-all-the-elements-that-share-a-class-when-the-mouse-has
$('span[class]').hover(
function() {
$...
I have a form in which I am using remote validation to check if an email address already exists in the database. However, the catch is that on this form, the user can select between several different "groups", and each group has its own distinct set of email addresses (thus the same email can exist once in each group).
The group select...
Hi,
I'm trying to create an infinite scroll component.
I'm using this site as a tutorial, but it seems that I can only get the infinite scroll on one way, because when I add elements to the leftmost side, the scrollLeft property auto-adjusts thus the page gets a quirky scroll, jumping instead of making a smooth movement.
Is there any ...
Hey Guys (and Ladies)
I am looking at getting the image name from an image with a src loaded dynamically.
Basically what I am doing is using the Google chat badge on a site to live chatting. And else where on the page, I have an image saying Live Chat:Online or Live Chat:Offline. And I want this to change depending on whether I am avail...