Hi all
I've been stuck on this for four hours, and I still can't solve it!
I am trying to check if a list item has a class of selected, then is so
change the opacity to 0.5. Here is my code:
if ($(#portfolio #thumbs ul li).hasClass(.selected)) {
$(this).css('opacity','0.5');
}
Just put the class in the selector instead of testing for it first:
$(#portfolio #thumbs li.selected).css('opacity','0.5');
If the class doesn't exist, jQuery will do nothing (instead of
throwing an undefined error or similar).
On Tue, Jan 5, 2010 at 12:45 PM, Paul Collins
Thanks very much for your help Brian. That works, but I think the problem
may go deeper than I thought! I've put up a test page.
I'm using the JQuery Opacity Rollover Script as a part of the Gallerific
plugin http://www.twospy.com/galleriffic/#1
To try and keep this simple, when you hover over
Sorry, the test page:
http://paulcollinslondon.com/test/test.html
2010/1/5 Paul Collins pauldcoll...@gmail.com
Thanks very much for your help Brian. That works, but I think the problem
may go deeper than I thought! I've put up a test page.
I'm using the JQuery Opacity Rollover Script as a
I am suggestion for new small feaute in jQuery.
add a new proeprty to bind function. a Scope property.
sometimes I am binding a function inside object. So I need a solution
to change the scope of this function.
something like:
$().bind('click',data,scope,function)
For
Let's say a user visits my site, and takes an action that requires him
to be logged in. I would like to:
- Take him to the login page
- Automatically return to the page he started from after he logs in
So I need to capture the current window.location, which is easy (var
returnURL =
I would do all of this server-side. Have your PHP script save the
requested page in the session before redirecting to the login page.
Or, write the requested URL to a hidden input in the login form.
On Sat, Dec 19, 2009 at 6:16 PM, Vik v...@mindspring.com wrote:
Let's say a user visits my site,
em: sexta-feira, 4 de dezembro de 2009 19:42
Assunto: [jQuery] Change opacity for all divs except one
Hello all,
I have a bunch of thumb nails that will be at full opacity when a user
gets to the page. Users will be able to select their favorite. What I
want to have happen is when
Para: jQuery (English)
Enviada em: sexta-feira, 4 de dezembro de 2009 19:42
Assunto: [jQuery] Change opacity for all divs except one
Hello all,
I have a bunch of thumb nails that will be at full opacity when a user
gets to the page. Users will be able to select their favorite. What I
want
Hello all,
I have a bunch of thumb nails that will be at full opacity when a user
gets to the page. Users will be able to select their favorite. What I
want to have happen is when a user selects their first favorite all of
the there thumbnails will be lowered in opacity then when they select
Have all the divs have a class name eg.) thumbs
When the user selects his favorite remove this class name from the
particular div and apply your opacity logic to $('div.thumbs'), so that way
the favorite one would not be changed.
Thanks Regards,
Dhruva Sagar.
On Sat, Dec 5, 2009 at 3:12 AM,
$(function() {
var list_item = $(li);
var current = -1;
list_item.hover(function() {
var index = list_item.index($(this));
if(index != current) {
$(a, list_item.eq(index)).css({backgroundColor:'#ccc'});
index = current;
}
}, function() {
$(a, list_item.eq(current).css({ backgroundColor:#FFF});
});
, 2009 6:34 PM
Subject: Re: [jQuery] Change a css value for a child of the selected element
$(function() {
var list_item = $(li);
var current = -1;
list_item.hover(function() {
var index = list_item.index($(this));
if(index != current) {
$(a, list_item.eq(index)).css({backgroundColor
, 2009 6:34 PM
Subject: Re: [jQuery] Change a css value for a child of the selected element
$(function() {
var list_item = $(li);
var current = -1;
list_item.hover(function() {
var index = list_item.index($(this));
if(index != current) {
$(a, list_item.eq(index)).css
Shame on me. I found my solution.. it was so simple :)
$('a', this).eq(0).css('color','pink');
Hi guys! I come write from Italy, I am a jquery noob and I am working
on it to improve my skills.
This instrument is fantastic for noobs!!
Here it is my website (do you like my shots??).
I am triyng to change horizontal image bar with new images when I
click on left sections.
How can I do it? Can
I'm developing a comment panel for a blog that uses Disqus. The design
is really tight, and the client is insistent that THIS is the layout.
You can see it here: http://agave.purebluebeta.com/blog/2009/nov/20/test-entry/
Problem is, the height is changed AFTER my jQuery is loaded. IE,
Disqus
Why are you using a root-relative URL ?
If the entire site is in a folder, and then you move everything into
another folder, everything will stay relative.
Therefore, having the path as img (or whatever the relative path to
that folder is) should work, no ?
Liam
nomen wrote:
Hi all:
Hi all:
I have a website. All my images are in /img directory.
Now, my client needs to put the site in a subdirectory, so, my
images are now in /subdir/img.
In the future, maybe we have to change the site to another
subdirectory.
I don´t want to change all my CSS anytime the
it would be a bad idea to do this with javascript.
I'd recommend simply using find and replace all in your css.
find url(/img
replace url(/subdir/img
nomen wrote:
Hi all:
I have a website. All my images are in /img directory.
Now, my client needs to put the site in a subdirectory, so,
First idea that comes to mind is to let your client define another site
base, you then don't even have to change your css as the apparent site base
would be the client's sub-directory.
You do that using the base tag as shown here :
http://www.w3schools.com/TAGS/tag_base.asp
Hope it helps.
Michel
Hi,
Can anyone tell me how to rotate the background-color style of a div
with a fade? I need it to rotate colors every 10 seconds, having one
fade into the next, and will need to have 3 background colors, then
keep looping from the first color.
My Div is named #rotateBG.
Thanks
Jonathan Snook's background animation article might be helpful:
http://www.snook.ca/archives/javascript/jquery-bg-image-animations/
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Nov 12, 2009, at 9:27 AM, Dan wrote:
Hi,
Can anyone tell me how to rotate
Anybody want to discuss a way to change row colors of table based on
content, for example:
+-|---+
|acess|COSTUMER |
|-|
| 1 | joseph |
| 2 | mary|
| 3 | john|
| 4 |
$(function(){
var w = $(window).width();
$('#background').css({backgroundPosition: w + 'px 190px'});
});
Could anyone explain to mee why this is not working...?
I'm trying (rather unsuccessfully) to fill a div that was created by
jquery. I feel like the code should work: any hints or solutions?
Here's my html:
div class=test_area
div class=foo/div
div class=fooAlt/div
/div
Here's my javascript:
$(document).ready(function(){
$('.foo').append('a
Hi guys
I have a dropdown menu. When the dropdown is hovered, I need a bg
image to show, then slowly fade out when the mouse leaves. I wrote
this little script for it:
var $j = jQuery.noConflict();
$j(function(){
$j(#dropdown-nav li ul li).mouseover(function(){
Hi all,
I have an .ascx page with a populated combobox:
select id=Users name=Users
option value=New User---New User---/option
option value=TedWilsonTed Wilson/option
option value=KatyBruceKaty Bruce/option
/select
I need that when the user select New User he will be
Hi all,
I have a form like this:
form id=my_form method=post action=
Name: br /
input type=text id=name name=name /
input type=submit id=submit1 value=Go to page 1 /
input type=submit id=submit2 value=Go to page 2 /
/form
how can I change my action form so the form goes to
Hi,
i'd like to know if i can change the page url somehow.
for example:
let say the page's url is: http://groups.google.com/group/jquery-en/post
i would like to change it to: http://groups.google.com/group/jquery-en/bla
without reloading the page.
is that possible? if so how can i do that?
Hi. I have the following layout.
.panel
{
position:relative;
width:580px;
height: auto;
/*overflow: auto;*/
padding: 4px;
}
.panelContent
{
position:absolute;
top:18px;
left:0px;
width:580px;
background-color:GrayText;
}
.rptViewer
{
clear: both;
Hi, all..
I need to change a keycode of triggered event...
What I need to do, is when a user pressing right + key on the numpud,
I need it to be TAB instead...
Since I cannt know when on the screen he will do it, I cannt use
itaration of elements... I cannt know what will be the next
Hi,
I would like to change the text of an asp button from client-side code
without posting back to the server. Is this possible to achieve with ajax?
Can someone give me a code example please?
Thanks!
--
View this message in context:
jQuery('#topfader-parent-forum').cycle({fx:'fade',speed:800,timeout:
6000,pause:5 });
That's cycle() plugin code that works.
Question: how do you make each inner element -- .topfader-child-forum
-- change its visibility to show as it's shown?
I have three radio boxes set up where each one is a different value. -
red - blue - green
I'd like when one of them is clicked to change the value of the url.
So for example --Changethisvalue-- would be actively updated on each
click.
http://domain.com/ad/campaign/g/--Changethisvalue--/dck/35
I have already read the similar post in this group, and have scoured
the internet in search of an answer, but nothing is working for me!
My website is all contained on one page. I have the jQuery lavalamp
menu at the top of the page with the About Me tab set to
class=current when the page loads.
i'm using Glossymenu at dynamic drive:
http://www.dynamicdrive.com/style/csslibrary/item/glossy_horizontal_menu/
what i want to accomplish is when I click one of the links inside the
LI element, the LI's in the UL lose their class of 'current' and the
clicked LI gains the class 'current'
i
hi there, have a puzzling one.
i have a fairly simple function call that we use to display tooltips
over certain image elements. we put the function call in the
onmouseover attribute of the image element.
looks like this:
script
function CreateTip( strTipMessage ) {
// GENERATE TOOLTIP
}
is there anyway to change width of a embeded video with javascript so
that user can click a button and the video will be bigger but it won't
start from beginning. it is like veoh website where you can click a
large button and the video will enlarge. Please help me out here.
thank you
I have a django app where i have a model which contains a boolean
(checkbox) field. What i would like to do is change the corresponding
table row color in the admin table based on whether or not this field
is checked. i have come to the conclusion that this is only possible
with jquery. i am a
I am totally new to jQuery. I wonder if it's possible to change the
background color of any row in the table below where the value of the
table cell belonging to class numericColumn is greater than 90? The
values in this column will always be numeric.
Thanks for any help, Lars
table
I need to use the animate function (slide, show, etc won't do) on a
project. Typically, 'animate' expands down and to the right. How can I
alter this? For example, I am putting thumbnails of images on both
sides of a site. When hovered, a larger version animates into view.
Because of the
I attach a change handler to a Select List. When the user selects a
list entry I use Ajax (.ajax) to query whether this entry requires
special acknowledgement. If it does I create an absolute positioned
div over the page and request that the user click a link to close it.
I attach a click handler
I'm trying to do something simple but this is my first stab at doing this in
JQuery.
div id=menu
ul
li class=current_page_item default.aspx home
/li
li about.aspx about /li
li
Hi, pulling my hair out here.
When the page loads I'm collecting a variable from the url which
corresponds to the class of an image. I want to then change the image
source. I'm doing this because the page doesn't reload and the menu
needs to respond to the content if you get my meaning.
$url =
Hello.
I have a form where i update some fields if there are info on the
database (autolad of data). Then I have to verify if some data must
been shown if certain conditions happens.
When I change the value of a *select* changes, validations are made
and I have binded that select for changes.
I have different subdomains pointing to the same file on my server -
simple enough. What I'd like to do is essentially reverse that: Can
the same file redirect to different subdomains?
For example: http://adamkobrin.com When you click on any of the top 4
links, different content is loaded, but
Hi,
I'm using a .change function to find out whether a radio button or not
is selected by the user. I then show() or hide() other fields
according to which radio button has been selected. Now, the problem
arises when someone clicks on the reload button of the browser, or if
some php validation
Hello all,
I can't quite get my head around how to accomplish this and any
guidance would be greatly appreciated.
Say I have some random number of h1's on the page, like 20. I'd like
to grab the first 4 and make them red, then grab the next 4 and make
them blue, then grab the next 4 and do
hi,
i have more than 20 images in a form
which might be refering like this image src = images/search.gif/
i want a jquery script for replacing all image src with image src =
http://s.images/images/search.gif/
please help
b u d d h a
Hi There,
I have been trying to integrate JQuery 1.3 into our software but found
it breaking where I have previously successfully been using JQuery
1.2.6 to select xml nodes.
The following test page illustrates and explains the problem. To
recreate the issue you would need to create a html file
Hello all,
a little new the js and jquery any help would be fantastic...
I have this in my linked myFx.js file:
$(document).ready(function() {
var selected_type = $('select#campaign_type_select');
var coupon_div = $('#campaign_create_coupon');
var broadcast_div =
Hi all i have one jquery calendar
$('selector').datePicker(); which is giving me in dd/mm/
i want to change this format to -mm-dd
i tried with
$.datePicker.setDateFormat('ymd','-');
error: $.datePicker is undefined
and tried with this code
$(#sd).datepicker.setDateFormat('ymd','-');
Hi all,
I'd like to think this is possible with JQuery, but can't find a reference
online.
Basically, I have a bunch of coloured logos that have links wrapped around
them. I would like to create a hover state using JQuery that makes the
images turn black and white when you hover over them.
I'm using filters to find if an li's text matches a certain value,
and then changing the value if it does. This works fine. However, if
I then use my selectors to check for the new value, jquery does not
seem to pick it up, making me wonder if perhaps the selectors only
work for values coded
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.
Is there
I have an app and want to change the url for all ajax requests to give
them a relative path. I tried to set up a global change using
ajaxSetup and beforeSend, but the url was only updated in the config,
not the request object. Any thoughts on how to do this?
code
$.ajaxSetup({
beforeSend :
Arrgh! Please can someone help me out with a jQuery/flash issue.
I have a page with a content region on the left and a flash movie on the
right.
The flash object calls in images from an XML file, using code like this
(generated using swfobject.js):
Lots of false-positives googling this.
input type=button id=a_button value=foo /
$('#a_button').attr('value', 'bar');
Doesn't work? Or, am i losing my mind?
Hi all,
I'm a new guy on JQuery, now reading the JQuery in action,
and I encounter with one issue:
.menu :hover a { ...}
anyone who has idea how to change into JQuery format?
or is that possible with jquery,
will be very appreciate,tks
Hi,
I've write this function:
http://dpaste.com/95869/
for change the background image on mouse click
My problem is that there are others funcions that can change the
background image, and my the function must change the images whatever
it is:
if there is the image bw-board2.png change
This seems like a simple thing to do put I cannot figure out how to do
it. I'm implementing the jcarousel scripts but cannot figure out how
to chnage the number of display pictures. Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are
Hello,
I'm fairly new to jQuery and am trying to do the following.
I am using a coda slider effect for a website, which is working fine.
What I need to do is change the overflow CSS property for a div when
another element is clicked.
Here's what I have:
script type=text/javascript
Hi guys,
I've written the below function to change the text on toggle, problem
is i want this though i don't want this to be controlled by the JS.
currently have 2 spans..
span class=viewView details/span
span class=hideHide details/span
The 'view' class is visible while the 'hide' class is
Hello,
I was wondering if it's possible to change the active tab. When you
load a page he will always show the first tab as active. Is it
possible to change the active tab.
For example on the index he shows the first tab as active, thats fine.
When i go to users.php he has to show the User tab
Hi folks
I got an animation that looks somewhat like this:
$('#pointer').animate({
left: activeItem.accumulatedWidth + 'px'
}, tempo, ' ' , function () {$(this).playShow(times-1)})
now I've added a beautiful ui.slider and want to give the user the
possibility to speed up or slow down the
I'm new to jQuery and JS
I want to change a snippet of code based on which link the user clicked.
So if the user clicked this link on the page:
# click me
I would like to hide a particular snippet of code inside a script tag. But
I'm not really sure how to write the JS/jQuery
Example:
How do I get jquery's change event you fire per letter
typed into a text box?
You can use the keyup event. If there are both text boxes and other
elements like radio buttons, you could attach the handler to both
events:
$('input').bind(change keyup, function() {
alert('you
Dave,
Thank you that worked great. Is there away to find out what specific element
is firing the event. For example I would like to know the 'id' of the
element that is currently being type in.
Thanks again,
Ronn
On Sun, Oct 19, 2008 at 12:24 PM, Dave Methvin [EMAIL PROTECTED]wrote:
How do
Try:
$('input').bind(change keyup, function() {
alert('you changed or typed something');
alert('Input ID:' + this.id); // or $(this).attr(id)
});
On 19 Okt., 21:26, Ronn Ross [EMAIL PROTECTED] wrote:
Dave,
Thank you that worked great. Is there away to find out what specific element
is
How do I get jquery's change event you fire per letter typed into a
text box? I'm using the code below, but it only fires when I tab off
the textbox.
Thanks,
Ronn
html
head
script type=text/javascript src=jquery.js/script
script type=text/
javascript
$(document).ready(function() {
Hi, I am using Jquery plugin for client side validation. But due to a
filedname I am facing a problem.
Example
var validator = $(#UserSignupForm).validate({
rules: {
data[User][username]: {
required: true,
Hi, I am using Jquery plugin for client side validation. But due to a
filedname I am facing a problem.
Example
var validator = $(#UserSignupForm).validate({
rules: {
data[User][username]: {
required: true,
Hi guys
I have the problem when go change de mask, i`m using maskedinput
http://digitalbush.com/projects/masked-input-plugin/
my code:
input name=tip type=radio id=tip_j title=Jurídica
value=J/Jurídicabr
input name=tip type=radio id=tip_f title=Física
value=F/Física
Hi,
I have the problem when go change de mask, i`m using maskedinput
http://digitalbush.com/projects/masked-input-plugin/
my code:
input name=tip type=radio id=tip_j title=Jurídica value=J/
Jurídicabr
input name=tip type=radio id=tip_f title=Física value=F/
Física
My problem is that I seem to be having a change even firing twice.
Here are the details
I have several checkboxes (input type=checkbox) all containing a
class named metaABOCode. Whenever one is ticked or unticked (hence
the change event), I want to grab some data via a json ajax call to
Hello Guys,
I'm looking for some help on getting started with a script that'll change
the href attribute of a link dependant on the option selected in a select
box. To add a little 'spice' the challenge the value of the href must be
determined from a set of key value pairs. Let me try and
I'm modifying the value of a hidden input field from a popup window. I
thought it would be a simple thing to bind a change event on this field so
that when it's value changed, something else would happen. This doesn't seem
to work. Am I doing something wrong, or am I misunderstanding what I need
Hi,
I want to have a simple event that notifies me whenever some input
type=text / gets changed its content.
But I can not use change() because it only fires when the input
changes and the input loses focus.
The event I would like would be an mixture of keydown, keypress,
paste, ... events.
Do
In my html, I have the following span to show upload percentage:
span id=progressBarText0%/span
I tried to update the percentage using the following javascript:
$(#progressBarText).innerHTML = 76%;
But it does not work. :(
Thanks.
Arden
So the title says it all pretty much. I have a design and I need to
have some running numbers along the side of a list. An ol would be
perfect and it is rendering:
1998. Item 1
1999. Item 2
To match the designs I need it to be:
1998 - Item 1
1999 - Item 2
I could just make a table but it
://www.nabble.com/Can-jquery-change-the-period-in-an-OL-to-a-hypen--tp17290680s27240p17292847.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Thank you so much for this example. It works quite well on the content
of the li but it does not modify the behavior of the ol meaning
that period stays. Ah well I thought it was a long shot, I guess I am
going with a table, lol.
Hi Eric,
Another way you could go about this is to continue using the ol but
hide the numbers through CSS:
ol {
list-style: none;
}
Then you could prepend the number with the hyphen to each li
Inside a document ready, you could do something like this (untested):
How do I change dialog title after it was created?
I try to do
$('#dlg').data('title', 'new title') or $('#dlg').data('dialog.title',
'new title') but its not working
the only way I get run the setData event is
using .data('setData.dialog', 'something in here') but then key for a
function is
I am using
$(#details).slideToggle(slow); for toggling a grid data.
for the same i need to show + and - symbols for expand and collapse
( using images).
Can anybody help me out with this.So that image also swaps according
to the expand or collapsed state.
How to achive this?
Thanks in advance
I have a NEW image that displays at the top of the page, if there is
new data. I had two loops(server side) on the page looping through
data; the first time to see if there was something new, and then the
second time to display the data.
To improve performance I was hoping to delete the first
Dear all,
I am working on slide panel as in
http://www.webdesignerwall.com/demo/jquery/simple-slide-panel.html
what i need to do is a reversed movement, instead of on clicking the
div is pulled down, on clicking the div is pulled up
Please advice me what do i need to do.
Thanks in advance.
group,
i just ran across an issue in IE6, that works in both Safari and
Firefox.
I am simply trying to change the source of an image using:
$('img#tab2').attr(src,/b_tab2_on.png);
img id=tab2 src=/b_tab2_off.png border=0 alt=colors/
I've noticed that in IE, the object is found but the attr
I finally finished it
// detect whether images are on
// and change styles accordingly
jQuery.imagesOn = function(){
$('img src=' + '/images/bgimage.jpg' + '#' + Math.random() + '/
' ).load(function() {
$('#noimages').attr(href, '/styles/gotimages.css');
$(select).change(function(){
alert(Selected: + this.value);
});
Is there any reason why this wouldn't be working on all the selects on
my page.
I create the selects dynamically, but this is up in the $
(document).ready(function() { block of my code.
hi all,
im using this approach in validation class=required on the element
form action= method=POST id=formEdit
input class=required type=text name=name
input type=submit name=clicker value=click
/form
script
$(document).ready(function(){
$(#formEdit).validate();
});
/script
it
Hi there,
Imagine i have a DIV with editable content (with Jeditable), but i
want the trigger for that to be a link behind the div.
It´s probably very simple, but i´m pretty new to jQuery and do not
know how to achieve this.
It has to look somewhat like this;
div class=edit
Hello,
I am experimenting with the validator plugin from Jörn. I found an example
where you can pass custom messages to the validator.
I was wondering now if it is possible to define new default messages, so
that I don't have to specify them for each validator.
I tried this :
Hey,
I'm wanting to change a div to another one onclick and then back again
when its clicked again.
I've managed to get it to change the div on the first click but
clicking it again doesn't do anything.
Here is the HTML
div id=maximize onClick=onMaximize()/div
div id=restore
It is not working... I am not sure what should I do
html
head
script type=text/javascript src=jquery.js/script
script type=text/javascript charset=utf-8
$(document).ready(function(){
$('#link1').click(function(){
alert('yo');
Hello,
I have an anchor. I want to change its CSS class and also disable the
clicking when it is clicked.
Can I do this with JQuery?
Thanks,
Miguel
I have this:
$('#id').click( function(){ $(this).css('background-image','url(images/
img.jpg)'); } );
Problem is that I want to use a path (images/img.jpg) that is relative
to my CSS file, not to the current page... The obvious first question
will be why not just put /path/to/images? The
I'm curious if I could use jquery to change my body's background based
on time of day. I'm not looking to do this server-side with php, I
would like the background to change based on the visitor's time, not
the server's.
I've found this code, just wondering if I can jquery-ize:
script
var now =
does .change not work it IE becauseI have this
310 destination.load('/lib/ajax/price_buster.php', {'get': 'destination'});
311 destination.change(function()
312 {
313 reset_data(0);
314 var destination_var = $('[EMAIL PROTECTED]');
315
316 nights.load('/lib/ajax/price_buster.php', {'get':
1 - 100 of 105 matches
Mail list logo