I'm very new to HTML and newer to JavaScript. Just getting started
with Expression Web 2.
I downloaded jquery.cycle.lite.js thinking I can use it for simple
swapping of photos in a space on my opening (home) page.
I've put following in my file.
script src=jquery.cycle.lite.js
Throughout the many plugins I have devoured while attempting to learn
all of the secrets/gloriness of jQuery, I constantly run into
something like or close to codefunction(el){ //Code Here }/code.
I'm guessing el is short for element and it's a variable of some sort,
but knowing my luck with
ONE: that the code below does NOT work with the latest version of
metadata.js
TWO: my working page does absolutely noting in IE7 and IE7. I am
hoping this is due to the metadata older version, as I'd read about
problems with the older metadata.js.
I fixed that demo page. It is now using
I'm using the form plugin and the most recent version of blockUI.
Here's my form initialization area:
$(document).ready(function() {
var options = {
target: '#search_results', // target
element(s) to
be updated with
Someone might say why not populating FirstName directly? I can't do
that since I have other ObjectMasters containing identical TD with
the same FirstName id, so I have to reach each TD through its parent,
otherwise I would be populating the wrong TD's.
You should not be using the same id
I am using the cycle plugin to swap entire pages for my navigation. On one
page, I have a unordered list that is supposed to be display:none by
default. Then when a link on the page is click, it shows slowly. However,
for some reason the cycle plugin seems to be showing it by default and
script type=text/javascript src=jquery-1.2.6.min.js/
script
script type=text/javascript src=jquery.corners.min.js/script
script type=text/javascript
div style=background-color:#acc; padding:10px class=rounded
{10px}
class=rounded {10px}
/div
script$(document).ready( function(){
this is driving me crazy!!
anyway, i moved everything here
http://www.pipelabitta.it/demo/
and this should be it!
Same problem. The css, js, and image files all return 403 Forbidden.
You need to modify the rights on those other folders.
Unfortunately not at the moment. To make one a have to move everything
on another server..
i 'll wait fotr the website to be published, then i will post again.
Thanks a lot, anyway
VItto
Is the #load element getting replaced when #colCont loads? If you
inspect it with Firebug is it still
say i have a html file containing a #viewPort div, with a series of
divs each containing an h4 tag.
If the file was not external, i would simply select what i need like this:
$('#dsViewport h3');
Now, it is an external file, so my question is: is it possible to
load this file via
thank you Mike !
Now, i don't actually want to display the loaded content, just need to
traverse it, and generate a submenu (one a element per h3 element
found, using the h3 element attributes). Can i actually load it inside
a variable?
Sure. I think this will work:
I have a bunch of anchors that look like this:
a href= class=clicker id=click_1click here/a
a href= class=clicker id=click_2click here/a
a href= class=clicker id=click_3click here/a
#
The my jquery code looks like this:
#
Anyone using jquery.corners.js?
I'm using it to create some rounded tabbed navigation. It works
wonderfully in Firefox.
Does this page work for you in IE?
http://malsup.com/jquery/corner/
i've had this question lying for so long in the bottom of my mind, i
thought i should finally clear it up:
I'm using a lot the animate() function, using a callback, and no
easing parameter. Such as:
$('div').animate({width: 400},'fast', function(){
$(this).addClass('visible');
I am working on an ajax app that uses jquery's form plugin and it works just
fine until I add a file upload input into my form:
input type=hidden name=MAX_FILE_SIZE value=2097152 /
input name=viscritfile type=file maxlength=300 /
If I take these input fields out, my form works fine and
I am using the ajaxForm() to submit a form and the success function
that is defined in the options array is firing 3 times. Any ideas?
Code:
var options = {
target: '.updateStatus',
beforeSubmit: updStatus,
success: showResponse,
I'm relatively new to jquery, and i'm trying to find a way to toggle a
simple animation?
At the moment I have this, which moves a div 400px to the left upon
clicking a link. Pretty straight forward.
$(document).ready(function(){
$(.slide).click(function () {
mmh..that's weird..i can see it right..
All of the scripts and stylesheets on that page return 403 Forbidden.
wow that works awesome. even able to apply it to several cycles. i saw
a posting about applying a delay to several cycles so that one starts
a couple seconds after another cycle (http://groups.google.com/group/
jquery-en/browse_thread/thread/fa74609bb63f46a/40f0bec91d0c6574?
I'm trying to position a menu div over a cycle slideshow.
It works fine on Safari/Firefox but in IE6/IE7 the menu goes under the cycle
slideshow upper slide, till the effect -fade- starts to be applied to the
next slide.
Is there a means to force the menu div to appear always on top of the
I'm having the same problem that is documented
athttp://groups.google.com/group/jquery-en/browse_thread/thread/976e498...,
but can't reply to that thread (too old?).
To summarize the problem, with IE6, whenblockUIis called theselect
boxes dissappear. When unblockUI is called they reappear.
Hi, I can't get jQuery cycle to work and I have no idea why, so I
would really appreciate some help.
my code:
HTML
?xml version=1.0 encoding=UTF-8?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//SV
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html
I'm using jquery ajax within a custom method and try to return its
result to that original method but I get nothing while it works fine
if I show it in alert window
here is my code:
jQuery(document).ready(function() {
jQuery.Test = function(){
jQuery.ajax({
type: POST,
url:
Anyone have some ideas as to how to stop/prevent the user from clicking or
even just prevent something from happening when the user clicks a link while
the cycle is in motion.Thanks
Mike
On Thu, Dec 18, 2008 at 8:39 AM, Mike Dodge dmikest...@gmail.com wrote:
I am working on a site here:
These suggestions helped, but I now I can't figure out how to submit a
form with a URL of an external site... i.e. my site ishttp://www.abc.com/
, but I want to submit a form tohttp://www.123.com/
Is this possible in ajax?
No, not with ajax, but the code I posted didn't use ajax. It just
$.ajax({
url: livedata_fetch.php,
ifModified: true,
success: function(data){
$(div#livedata).html(data);
}
});
That's the correct way to do it. Does that page have a Last-Modified
header? Does the server return a 304 on
script
$(.welcome-picture).mouseover(function(){
$(.welcome-desc).hide();
$(# + this.id + -desc).show();
});
$(#welcome-sip).click(function() {
window.location =http://www.net-vitesse.com/content/mclink;;
});
$(#welcome-services).click(function() {
window.location
jquery.corner doesn't work when html is written in ajax request on the
fly and send back to the client.
Should i use LiveQuery or something else to make it working ?
You can use LiveQuery, or your own rebinding code, to initialize the
corners on dynamic content.
Here is the code that should show 2 divs with corners and foo and foo2
in it.
Where is my mistake ?
script type=text/javascript
$(document).ready(function(){
$('.rounded').corner();
$(#Idsubmit).livequery('click', function() {
I take it back, my livedata_fetch.php is coming back with a 200
status, but I want it coming back with a 304 not modified, right?
That means it'll only fetch the file if it's been updated since the
last time it was fetched?
Right. The server needs to set the Last-Modified header for this to
I saw the demos where div sizes were animated. Can this be done with an
image? I have some button(image) links on my site. I would like to make
each image a little bigger when you hover over it. Anyone know the best way
to do this?Thanks
Yes, you can certainly animate images. And you
OK, I think I got it (it was more code than I had thought it would
be). This does seem to be working.
On initial load, I get a status 200, then wait a while and it cycles
through 304s (nothing new to fetch). Cause a change to my test.txt
file on the server and the next time it fetches the
How can I use 'prevNextClick' callback to be able to set the
'pageAnchorBuilder' to enable highlight in the next batch item.
I cant see the possibility to pass the 'pageAnchorBuilder' to the
first item next batch.
prevNextClick is a callback function. When it is invoked you can so
Great news, I was able to get the site online so I can show others and
therefore get some help. Here is the URL:http://adc4web.adceval.com
Any insight to why it is being jerky/choppy would be greatly appreciated.
Thanks
Mike
Hmm, tested in FF3.05 (Mac) and it looks fine.
$(document).ready(function(){
$('a#link').click(
$('div#bugDiv').slideToggle('slow')
);
});
Right now, the way it works, the bugdiv slides to hidden on load, as
though it's just executing the code as opposed to associating it as
the onclick
Hi Matt
I think the click handler will need wrapping in a function as well:
$('a#link').click(function() {
$('div#bugDiv').slideToggle('slow');
return false;
});
Ah! Good catch, Michael!
You should have a look at event delegation, currently you are attaching 2
event on each row. So if you have a lot of rows, its memory/cpu heavy.
I agree with Olivier. Here's a resource to get you started:
http://www.learningjquery.com/2008/03/working-with-events-part-1
I GOT IT. How to explain what the problem was?!...I've done a bit
of tweaking, but one thing is I was returning false from my form
submit handler WHICH IS WHY I WASN'T HITTING MY PHP $_POST BRANCH.
Whenever I would submit I was getting my default search page again.
Made the search field
I am creating a website for my company. I am using the cycle plugin to
navigate horizontally between pages. The plugin is awesome. However the
site is starting to get pretty full and I've just added something that has
made the cycle navigation choppy, just in firefox. The site is not
I was trying to create an advance thumbnail pager with synchronize
transition with content slide show.
Objectives:
a. When the next ( ) is pressed, it should highlight the next
(first) item in the next batch in the pager and show the content slide
show.
b. When the previous () is
jQuery.ajax({
type: 'GET',
url: http://picasaweb.google.com/data/feed/base/user/
picasa_non_esistent_user?kind=albumalt=json,
dataType: 'jsonp',
error: function (xhr, ajaxOptions, thrownError) {
alert(error triggered);
if(xhr.status
When I write it like this $('input#emailaddress')
I get a this.val undefined error...
That's because 'val' is not a property on a that element. You want
'value'.
I'm using jQuery.hover for a dropdown menu and I want to add a slight
delay to mouseOut functions but I can't figure out how to pass the
jQuery(this) reference into the setTimeout() function... can this be
done?
jQuery('li.drop').hover(
function(){
Basically, what I'm running into is my php branch is not executed
while the form has an id (jQuery is taking precendence). If I remove
the id, the php branch works, but then obviously the jQuery code
doesn't run.
Anyone have any ideas how I can get both to run? Can I put php code in
jQuery
You should never have an element with an id value that does not match
its name value. Get that straightened out and you'll be fine.
That's not true at all. Do you have a reference for that?
The id attr. is solely for the DOM, while name is passed to the server.
Yes, that's quite true.
Yes, the id on the form element.
If I remove that, then var_dump $_POST, I'm definitely getting my form
info, for example here's a var_dump of my latest search:
array(2) { [search_field]= string(7) leopard [search_button]
= string(2) Go }
But then I already knew that because without
I'm using the Cycle plugin and I'd like to change the transition
effect dynamically. I tried stopping the show and restarting by
calling .cycle() with different options, but it didn't work
properly. Some of the slides would be missing and the animations
didn't always operate correctly.
Hi
My default character set is utf8, should I use encodeURI when use ajax
sending the data to server?
for example
$username = $('#username').val()
$.ajax(
{
url:'xxx.php',
data:{username:encodeURI($username)}
..
jQuery's ajax function will do that encoding for you when you pass an
I tried using the onBefore, and I looked at the samples at your
website (http://malsup.com/jquery/cycle/int2.html), but for some
reason, the function doesn't recognize the image title or alt text. I
get the this.src or this.alt as undefined. And that's the reason
I turned to the
Quick layout question. My slides will not wrap inside its parent div.
I've noticed the cycle demos are nested inside tables but is it
possible to simply wrap them up inside a div?
I don't think I understand your question. Nearly all of my examples
use a div as the container element for the
I would like to know how to use jQuery to control (create, delete,
update, toggle, animate, etc.) divs. I have been searching, but never
find anything satisfactory.
Can you be more specific?
// create
var $div = $('divhello world/div');
// add to dom
$div.appendTo('body');
I want to learn how to use jquery. Does anyone know any good books or
sites that will teach it?
http://www.learningjquery.com/
Please a look at simple example
herehttp://www.2shared.com/file/4448827/d6437194/web.html
if it cool enough to be qualified as a plugin, I will contributed the
finished source.
You'll have better luck with feedback if you post a link to a demo
page.
How can i write selector to retrieve elements (span) that contains
'PB' as part of id.
My ids are dynamically generated as PB1 PB2 etc.
spans that have an ID that starts with PB:
$(span[id^='PB'])
http://docs.jquery.com/Selectors/attributeStartsWith#attributevalue
I'm trying to create a plugin with two entry points. You would use it
like this:
$('#someid').myPlugin.doThis(options);
$('#anotherid').myPlugin.doThat(options);
How about one of these approaches instead:
$('#someid').myPluginDoThis(options);
$('#anotherid').myPluginDoThat(options);
or
I have a dynamically created form that I'd like to submit
automatically after it loads. It doesn't look like forms have an
onload event. I would use the window onload, but the form isn't
necessarily around when the window loads - it is created later in a
jquery popup.
Any suggestions? I
I have been searching for a way to have 1 pager to control 2
slideshows with the same number of slides. Where one slideshow can
have a scrollLeft and another just with a fade. Is this possible with
the current plugin?
Here's a demo:
http://jquery.malsup.com/cycle/pagers.html
Why can't I duplicate this behavior?
Because you're not using the checkbox itself to fire off the
block his code and my quick example do
Ah, thanks for clarifying, Steve. I'll get that fixed.
Mike
Ah, thanks for clarifying, Steve. I'll get that fixed.
It's fixed now.
http://www.malsup.com/jquery/block/#download
Thanks for responding, Mike. I noticed today that setting the height
and width explicitly with CSS did not actually make all the images
show. It did cause the area where the image should be to be the
correct size, but the image was still not displayed. Please take a
look and see if you
serializeArray(): Serializes all forms and form elements
(like the .serialize() method) but returns a JSON data structure for
you to work with.
I'm trying to use this method to serialize a form to a JSON string,
however is not working.
Instead of: {'Name':'yuiy','hdnValue':'ringo'}
it
Could you possibly post a demo page somewhere?
Mike, this code:http://paste.pocoo.org/show/95075/
shows what he means, i even tried to change .click to .change and
it still never checks the box
Why can't I duplicate this behavior?
http://www.malsup.com/jquery/block/dec12.html
$(function() {
$('#s1').cycle({
fx: 'scrollHorz',
speed: 'fast',
timeout: 0,
prevNextClick: onBefore,
next: '#next2',
prev: '#prev2'
});
Don't use the prevNextClick option, that callback is only invoked when
the prev or next item is clicked. Use the 'before' option instead.
The client has 30+ fairly big images to load (~3MB total page load),
so the normal loading scenario doesn't work very well.
The way I worked around it, is I've added all the HTML code for all
the images, without the actual image file. When a visitor views the
page, I progressively load the
Actually if you put a debugger; statement there and debug with
firebug you will see that it actually gets called. But for some reason
the alert does not work. But other js code will work so you can show
your messages somewhere else on the page if you want or need to.
Post a link so we can
Is it possible to display one blockUI over another
Maybe, but you'd probably need to hack at the plugin. It was designed
to display a single page block at a time.
UPDATE:
As I have been writing this message, I have been trying some other
options to see if I can resolve the issue myself. It looks like the
problem is solved by setting explicit height and width properties in
CSS. Mike, if you are out there: is this expected behavior?
It sounds like
I'm trying to convert an xml node into an object...all I want to do is
find the name of the tag...function
function initObjArray(xml, arr, tagName){
(xml).find(tagName).each(function(){
var o = new Object();
var t = $(this);
var c =
http://reenie.org/test/jquerytest.html
This uses
$('#container').load('content.html'); to load content from an html
file
http://reenie.org/test/jquerytest.html
This uses
$('#container').load('content.php'); to load from a php file.
Why doesn' t the second one work? They are the same
Please let me know where i am wrong.
Move this line:
$('#add_prime_show_id').ajaxForm(options);
and put it right beneath this line:
$('#admin_ajax_new_content_id').html(html); //show the html
inside .content div
For background info on why:
Live example at:http://john1.netfirms.com/VAM/news.html
Any help is appreciated.
You just need to get the right style rules in there. Here's a hint:
http://jquery.malsup.com/cycle/test/dec4.html
That's because the element did not exist when you assigned the click
handler. Have a look at the liveQuery plugin [1] or otherwise make
sure that any newly-created elements are given notice of how the're
supposed to act when you introduce them to the document.
While I love most things in jQuery, one thing I don't get is
replaceWith. This method returns the object you just replaced, which
as far as I can see is 100% worthless, rather than the the object
you're replacing it with. If you do:
$.(someHtmlElement).replaceWith(divmy div/div);
100%
I'd love to see someone find a fix for this. It seems to crop up when
the opacity is set, however removing the opacity doesn't seem to
matter. Best workaround is to avoid fading text. If you absolutely
have to, try putting a div in front of the text the same color as the
background and
I have a two div with two id :
div id=somediv
many Contenet
/div
div id=result/div
i want to make something like that :
$(#somediv).bind(mouseleave,function(){
$('#result').fadeOut();});
$(#result).bind(mouseleave,function(){
$('#result').fadeOut();
});
But i don't want
No matter what I set the z-index to, it always blinks through the
layer. Here's a very straightforward example that shows the issue in
every version of FF2 I have:
Dan, do you have the cursor keys option enabled?
Welcome to Google's API Loader
script type=text/javascript src=http://www.google.com/jsapi;/
script
script type=text/javascript
google.load(jquery, 1.2.6);
google.load(jqueryui, 1.5);
/script
If you link directly to the scripts that you need you can eliminate
the unnecessary google
I'm using Block ui to block during Ajax calls thusly:
$().ajaxStart($.blockUI).ajaxStop($.unblockUI);
but it flashed black before beginning to fade in, is there a better
way to do this ?
a better pluging to use?
Is there a way to fix this?
I goto the demo page and all the demos
I am using ajax form plugin. After I defined the new value (different
with the attribute value of the form) of url and type properties
within Option Object, and pass options to ajaxSubmit. It didn't
override the form attribute value. Anyone knows why?
Can you post your code or a link?
I am sending user to different sites based on their attribute once
they log in. I added a ajax call to check the users attribute before
submitting login form. I am implementing this using ajax form plugin.
The ajax call reside in beforeSubmit call back function, it seems
that the ajax call
Greetings!
I've
seenhttp://docs.jquery.com/JQuery_1.2_Roadmap#Form.2FField_Serializationhttp://docs.jquery.com/Release:jQuery_1.2/Attributes.
Is fieldValue() still better then standard val()?
The main difference is that fieldSerialize tests for successful
elements and val does not.
Hi all,
i have tried to transform a bind example to my situation, but i can't
get it working.
Via my menu, i load a form which i want to validate.
( with Validation plugin
fromhttp://bassistance.de/jquery-plugins/jquery-plugin-validation/
Loading the form into my content div works fine,
var xhr = $.ajax( {
url:' getFontInfo.php',
data: 'font=' + fontFileName,
asynch: false
} );
The option is 'async', not 'asynch'.
Aside from that, I could implement server-side data caching that
ignores the headers.
I think if you implement server-side cache headers correctly you will
no longer see the client headers you're trying to avoid. Caching
should be driven from the server.
I was combining the ajax form plugin with the ajax validation plugin, which
is why I need to call ajaxSubmit. I wrote up the details
here:http://haacked.com/archive/2008/11/21/combining-jquery-form-validatio...
The workaround I did was simply to add a hidden input with the same name as
since technically there is no next element, it goes back to the front?
There is always a next slide. :-)
The problem in IE7 was that I had an extra comma in the code that I
posted and a JS error was occurring in IE7. I didn't realize the
extra comma problem had been fixed in IE8 - good to
I can use them one at a time, but when I try them together only one of
them works: Here is my code:
$('#slideshow').cycle({
fx: 'fade',
speed: '2000',
timeout: 0,
pager: '#nav',
The first one, is how can one cancel an upload while upload is in
progress.
You can cancel an upload by invoking the abort method on the XHR
object (assuming you have the latest version of the form plugin,
v2.17). To get a ref to the XHR you can either use the global
'ajaxSend' event handler
I'm trying to get the values of all checked check boxes in a certain
section of a page. Each of the check boxes has the same id, I could
just as easily make it a class or whatnot.
I'm using something like:
var valArray = $('#' + id + ' input:checkbox').serializeArray();
Although I know
If I call
jQuery('form1').ajaxSubmit();
The value sent to the server is foo=bar and not foo=barbutton=click.
Is there an easy way to get this to work? It's needed by my backend
server.
Use ajaxForm instead of ajaxSubmit and you will get that behavior.
Note that you call ajaxForm once to
The example you listed below is using a different jQuery method, load
(), to retrieve the content. It's not sending the headers, which is
good. But I think I need to use the $.ajax() method.
Ah, now I see what you're doing. You're using POST. Here's a snippet
from
How possible to define Chrome browser like other, for example Safafri:
if ($.browser.safari) {
alert('This is Safari')
}
it intersting that chrome browser do same Alert
This is Safari'
Question.
How to define only CHROME browser?
$.browser.chrome =
I've tried $('#form1#input1') or something similar but it doesn't
work. What is the correct syntax? Thanks!
The correct syntax is CSS, so you need a space between the two:
$('#form1 #input1');
or, since the input you want has an ID you can simply use that:
$('#input1');
I got it rotating, however I cant get the images to stay in the middle of
the div. If I add
position: relative !important;
top: 50%;
left: 50%;
to the image class when being displayed it centers horizontally but not
vertically, but it also breaks the fade transition by displaying the
That works great in firefox, Opera and Safari and it is exactly what I'm
looking for.
But when testing it in IE 7.0 it doesn't show anything except for the
background colors.
Interesting. I'm running IE8 and it looks ok when running in IE7
Browser Mode as well as Compatibility Mode. Can
...however, this does not work properly. Rather than replacing the
header values, it appends them. For example:
Cache-Control: no-cache, private
...this is not the desired effect.
Any thoughts? Thanks!
The only thing odd about what you've described is that the cache
headers are being sent
form id=form1.../form
form id=form2.../form
how would i do a form submit?
$('#form2).submit();
is not the correct syntax. what is the correct syntax? thanks
Yes, that is the correct syntax. Do you have more than one element
with that ID or name on your page?
In the parent window's Javascript we have functions that are wrapped
inside of the dom ready stuff ( $(function() ) ... normally you can
access functions in a parent window by calling self.parent.functionName
() but since they are wrapped in the on dom ready stuff for jQuery I
can't figure
Having a little trouble finding good examples of uses for the core
function data(). Anyone know of a tutorial or some such on this?
A lot of plugins use this capability. For example, I use it in
BlockUI and Cycle. It's a great way to store data that you will need
later. In Cycle I use data
i've checked online tutorials, and with 1 form, i can do
$('form').submit()... but for some reason, i cannot do something like
$('#form2').submit()
Maybe you could post an example page for us. There is no difference
between those two statements, assuming the markup matches
accordingly.
501 - 600 of 1583 matches
Mail list logo