I have a UL that contains items that the user can click on and move from one list to another. I have a function to inspect the list item and move it from one list to another and it works well -- except for one problem.
The list item contains an image (which also responds to the click event). So if my user clicks on the image (essenti...
1) We have <body>, it's height and width varies (different resolutions).
2) Many blocks with images inside it, can be more than 50 blocks.
3) width and height are equal for each block.
How can we fill the body with all available images, that can be visible on current resolution, and hide others?
There should be no horizontal/vertical...
What would be the advice on starting and organising a library of useful code based on the jquery library?
Im thinking of starting this for all of the code that I use alot and ends up just being copied and pasted between projects.
I would like to have all of this functionality included in some sort of library of plugins?
Any ideas or b...
I am trying to append an <li> at the end of the result set without success. I am in the dark as to the length of the result set, as it can change based on the input, so my counter I have set up only works if the results reach the limit.
The documentation I found on the jquery ui site has been helpful getting me to this point.
I initiat...
Hi :)
I need to stop a Vimeo video embedded with new oembed api (universal player) but when I try to add an event I get this error:
Uncaught TypeError: Object #<an HTMLIFrameElement> has no method 'addEvent'
But I don't why I get this error, I added jquery and the frogaloop api, also I added ids to the iframes, but it still doesn't w...
var one = 1415;
var two = 2343;
var three = 11;
How to get the biggest number from these variables? (the shortest way wanted)
...
I already have a form with normal HTTP post. Now, I want to rewrite this form usign jQuery Ajax request. Here is what I have:
register_user.html.erb
<%= form_tag :action=> "register_user" %>
<label for="user_id_1">user_id_1:</label><br/>
<%= text_field "user", "user_id_1", :...
I really like how sites like FogBugz and Facebook offer snappy user interfaces by loading page content asynchronously.
What are some good resources and patterns for applying this to other websites? I am looking for a solution that creates a unique hash URL for each page, preserves history and basic browser functions, and degrades gracef...
So I have
VARIABLE = Math.floor(5*Math.random());
Then
.animate({left: '+=VARIABLE'}
but it doesn't work.
In my css my div already has a left attribute. If I do left: newx + 'px' it sends it to the random number I generated, meaning it jumps to the top of the page.
...
I am trying to create a gallery through a plugin I am making but am getting a javascript error and cant figure out why. Below is my code any help would be greatly appreciated. Here is where I have implemented it. http://findlegalanswers.com/?page_id=4
<?php
/*
Plugin Name: iPad and iPhone Swipe Gallery
Version: 1.0
Plugin URI: http://ww...
There are many dimensional functions, inside one of them we need to use onload event (do something when page is loaded).
The problem is the code inside $(window).load(function(){}); doesn't work. But it works outside the function.
Whats the problem?
...
I have about 25 show/hide (toggle) elements on a page like so...
HTML:
<h2><a href="#" class="link1">Headline One</a></h2>
<div class="toggle-item-link1">content</div>
<h2><a href="#" class="link2">Headline Two</a></h2>
<div class="toggle-item-link2">content</div>
JS:
$('[class^=toggle-item]').hide();
//toggle content on click
$('...
Hello,
I have this markup:
<div id="myElement">
<ul>
<li><a href="#1" class="myElementLink">Link 1</a></li>
<li><a href="#2" class="myElementLink">Link 2</a></li>
<li><a href="#3" class="myElementLink">Link 3</a></li>
</ul>
</div>
Which is the syntax to select all "myElementLink" within "myElement"?
Thanks for helping
...
As soon as a page loads, I want the focus to jump to a particular link, so hitting enter will 'click' it.
I've tried
$('ul li a:first').focus();
without luck, but I think I may be misinterpreting the usage of .focus().
Any advice appreciated!
:s
...
I have a Excel like online spreadsheet for some purpose and it's almost done and working perfect but there is a issue I am facing and want to rectify.
You can see spreadsheet there at http://partydesigners.site50.net/Excel%20Like%20App/Index.html
The issue is that at one single time more than 1 users are using this spreadsheet and if ...
Hello, using jQuery, I'm trying to get values of fileTypes by using an index. I'm not sure how to do go about doing this but so far I've tried settings.fileTypes[0] which does not work. Any help is appreciated, thanks!
var defaults = {
fileTypes : {
windows: 'Setup_File.exe',
mac: 'Setup_File.dmg',
...
Hi,
I have this markup:
<body>
...
...
<div class="helper">
<div class="menu-container">
<ul class="menu">
<li><a href="#" class="theLink">Link 1</a></li>
<li><a href="#" class="theLink">Link 2</a></li>
<li><a href="#" class="theLink">Link 3</a></li>
...
The flow for my application, for non-logined users, looks like this:
1) non-logined user does a given action that requires login (arbitrary)
2) dialog appears for non-logined user and he logins without any refreshing of the page
3) collecting of additional information if it is new user
3) the given action should be executed
How can i...
My problem is very similar to this post: Validate subset of form using jQuery Validate Pugin, but couldn't get anything to work.
I'm trying to use the jquery validation plugin to do partial form validation in an onclick js function.
I have a view that has a form with many divs, each div represents a page like so:
<form method="post" n...
What's the best way to get the currently selected tab via the tab panel's id?
My tabs which presents comments looks as follows.
<a_comment_form>
<div id='#tabs'>
<ul>
<li><a href="url_to_ajax_resource" title="div1_server_index"></li>
<li><a href="url_to_ajax_resource" title="div2_server_index"></li>
</ul>
<div id='div1_server_index'>
...