JQuery :: Selector Logic - ":not(.stars) A"?

Mar 6, 2010

I'm trying to attach a colorbox to all the links on a page exceptones within a div having the class 'stars'. Shouldn't I be able to do thisusingjQuery(":not(.stars) a")? This seems to completely fail to exclude the stars (which happens also with div:not(.stars) and other classes), it's just as if the :not clause wasn't there at all.

View 6 Replies


ADVERTISEMENT

Jquery :: Reset Stars Without Clicking On Cancel Button

Jun 8, 2009

how can I reset the stars without clicking on the cancel button, like on any other event on the page? is it possible?

View 1 Replies View Related

Jquery :: Get Rid Of 'cancel Rating' Button That Appears Next To 5 Stars When Enabled

Oct 12, 2009

i want to get rid of the "cancel rating" button that appears next to the 5 stars when enabled. I need to force the users to enter a rating,so i need to take the cancel rating button off (makes value = 0).I can't find how to change this!

View 2 Replies View Related

Changing Stars Into Pics ?

Nov 28, 2010

Image1=new Image();

I have a pic saved on my computer and I cant get my script to point to it.even if i put the whole path in. am i not understanding how to point to an image.

This is the classic flying starfield script that i am playing with. how to change image

View 2 Replies View Related

Couldn't Make Smaller Stars On Trail

Nov 9, 2011

my relative wanted this star trail effect on the site: URL...I did similar effect below but I couldn't make smaller stars on trail, how can I achieve this?

View 2 Replies View Related

How To Create Simple Rating System With Stars

Jul 28, 2009

can someone tell me how to create a simple rating system with stars or something like that and can i do it in js?

View 1 Replies View Related

JQuery :: Select Elements With Multiple Classes AND Logic?

Apr 13, 2010

The default behaviour for a class selector is: "An element can have multiple classes; only one of them must match." Is there a class selector where you can use multiple classes and all of them have to match?

View 1 Replies View Related

JQuery :: Difference Between Class Selector And ID Selector?

Sep 8, 2011

Are there any difference between class selector and ID selector

View 2 Replies View Related

Making A Diamond With Number Of Stars That User Inputs?

Oct 26, 2011

I'm new here, and I'm a programming newb but am very interested in learning and possibly pursuing programming in the future. As such, I'm taking an intro to Javascript class at my university, and our homework is to make a function that when called upon makes a diamond out of *'s. It is supposed to do so by prompting a user for an int and then makes a diamond shaped object with the inputted number of stars in the middle of the diamond. an example of what this would look like (if a user entered in "5" to the prompt):

[Code]...

View 1 Replies View Related

JQuery :: Using Multiple Select Menus And Conditional Logic To Display Results?

Aug 2, 2011

I am building a jurisdiction calculator for issues on/off Indian reservations. I'd like the user to select 3 variables (radio buttons would also work) - whether the victim is Indian/Non, the perpetrator is Indian/Non, and whether the crime occurred On/Off a reservation and have a div that displays the possible jurisdiction outcomes based on the selections.For instance, if the user selects Victim: Non-Indian, Perp: Indian, Location: On reservation, the possible jurisdiction results would appear.

Here is the basic html breakdown:

<select id="VictimSelector" name="VictimSelector">
<option selected="selected"></option>
<option>Indian</option>

[code]....

View 2 Replies View Related

JQuery :: Check Textbox Values On The Front-end Before Submitting To Server-side Logic?

Feb 24, 2011

I am new to jQuery, and learning more about Js by doing. I can hand-code HTML and CSS very well and understand OOP effectively. However, troubleshooting complex Javascript code combined with jQuery is a challenge to me, but I really want to learn. I am using Windows XP Professional and IE 8, FF 3.6.

[Code]...

View 4 Replies View Related

IE Reverses Logic

Jul 23, 2005

While the following code works in Firefox and Mozilla,
IE6 reverses the logic (when I click yes on the top it checks no on the
bottom and vice versa).

<form method="POST">
<p>
<input type="radio" name="decide" value="yes"
onchange="decide1[0].checked = decide[0].checked">yes
<input type="radio" name="decide" value="no"
onchange="decide1[1].checked = decide[1].checked">no.</font></p>
<p>
[...]</p>
<p>
<input type="radio" name="decide1" value="yes"
onchange="decide[0].checked = decide1[0].checked">yes
<input type="radio" name="decide1" value="no"
onchange="decide[1].checked = decide1[1].checked">no.</p>
<p>
<input type="submit" value="Submit"><input type="reset"
value="Reset"></p>
</form>

Please advise.

View 11 Replies View Related

Paging Logic In Javascript?

Apr 12, 2007

I have writting all of my paging logic in javascript.
It works pretty fine. Basically, I have created a
gridview with full paging in javascript. Now, given
a certain need, I am being advised to do my paging
on the server.

My question: is there a performance cost by doing
all my paging server-side (and cost benefit by keeping
it on the client). Or, does it matter?

View 3 Replies View Related

Imageflow Like Gallery Logic?

Jun 12, 2011

I want to create an image gallery like imageflow, but having tough time to figure out the way top, left, height and width are computed for each animation call.

View 2 Replies View Related

Find Example Of Country Selector Which Also Provides A State Selector If USA Is Chosen

Jun 5, 2009

I'm trying to find an example of a country selector (which also provides a state selector if USA is chosen) then you cvan select the city, any samples out there?

View 2 Replies View Related

Moving Server Side Logic To Javascript..

Feb 12, 2007

I work for a financial company. I am planning to give a presentation
to rest of the development team (15 people) here on moving server side
logic to client-side javascript for an internal intranet application
rewrite. This approach will definitely stir up hot debate from
hardcore server-side Java folks who wants to do UI stuff even on the
server!. Since I am pretty much known as the JS or UI Guy of the
group, my Boss wants to hear the broad spectrum of PROs/CONs from each
proponent.

Personally, I think Javascript/Ruby is a more productive language than
Java.

My idea is simple. It is to convert most business logic to client-
side javascript and have calls to server-side code restricted to user
roles with data validation. Thats as simple as it gets.

Here are my list of arguments

1. True separation of UI logic from server-side data processing code
(no more server code spitting out client-side code)
2. Better user experience with faster response
3. The whole web 2.0 thing (no page refresh) :)
4. Offload client processing from server therefore reducing network
traffic (not really a strong argument is this?)

Keep in mind this is an internal app. Even if someone figures out the
JS logic behind the page and try to hack the app by posting to
Servlets, they will be restricted by their login role, and data
validation will take care of any bogus data being submitted.

View 14 Replies View Related

Logic Error In AcroJS - Subtracting Instead Of Toggling

Feb 4, 2011

Putting some javascript into a pdf file and can't get this to work out right.

Basic setup:

Field X = checkbox;
Field Y = numeric input field;

Here's what should happen (increment is toggled):

Y has a value. When X is checked, Y is increased by 5. When X is unchecked, Y goes back to its original, unmodified value.

Here's what really happens (increment is subtracted):

Y has a value. When X is checked, Y is reduced by 5. When X is unchecked, Y is reduced by 5 again. Anytime X is clicked on, Y is reduced by 5 yet again.

Here's the code:

View 2 Replies View Related

Logic Error On Limiting The Modification To The Maxvalue ?

Feb 26, 2011

How to create a function that would allow me to add to or subtract from a maxvalue, and thankfully I got help regarding that. However, something's got me stumped for the past few weeks that I still can't resolve...

This is the relevant code:

As it stands, it works as long as the total value is less than or equal to the limit (for advantages it's 15, for disadvantages it's 10). However, the moment it goes past the limit -- for instance, if you change Antisocial's value from 2 to 7, or if you add several additional checkboxes with any values -- the whole thing starts going crazy; specifically, maxvalue doesn't revert to 40 when the all the checkboxes are unchecked.

What I'd want to happen is that the user cannot select or apply advantages or disadvantages if the maximum advantage is greater than 15 or the maximum disadvantages is greater than 10.

I'm thinking that a button for adding disadvantage points to/subtracting advantage points from the maxvalue (that becomes disabled if the user goes past his limit on advantages/disadvantages) is useful at this point, but I'm really stumped on the implementation of the idea. An alternate idea of mine is that all other advantage/disadvantage checkboxes would become disabled if their value is greater than the remaining number of points, but I don't know how that is possible either.

View 2 Replies View Related

Logic Error - Generate Lists For Each Week

Apr 1, 2011

I'm trying to generate lists for each week (open in IE to see what I mean) but somehow one row is being missed and I can't seem to figure it out.

Link to ZIP is below: [url]

View 1 Replies View Related

Does Order Of Logic Comparisons Affect Speed In The Same Statement

Mar 18, 2010

was wondering if it made sense to optimize the comparison order inside an if() statement if one of the comparison targets is a function call eg:

var a = true,
b = function() {return false;};
if (b() || a) {...}
if (a || b()) {...}

would the second statement run faster because it would theoretically never need to call b() in this situation? can the eval order be relied on? does this depend on the js engine/internal optimizations?

View 2 Replies View Related

JQuery :: Compare 2 Arrays Using "OR" Logic?

Dec 8, 2011

This should be simple but my brain isn't quite working today.

I have 2 arrays, e.g.

arr1=[1,2,5,35]
arr2=[3,5]

I want to create a function that will return true if ANY value of arr2 is found in arr1. I can currently only get it to return true if all values are in arr1 (using array_diff).

View 1 Replies View Related

Screen Updates Don't Match Program Logic/state Or Order

Jul 20, 2005

there's a line in my Javascript program that makes a change in the
appearance of an area of the screen. it is a game program, so there are
a cascade of changes after the user makes a move. these are carefully
sequenced and timed in a loop which contains the "action" statement

document.images[k].src = offGIF[currNode];

unfortunately, the *actual* screen updating appears to be 1)
asynchronous and 2) faulty!

_asynchronou_s in that things change in the wrong order, as if each has
its own thread and they run at random.

_faulty_ in that occasionally an area that would change from, say,
picture1.gif to picture2.gif and back again (according to game logic)
lands up showing picture2.gif. even though the internal game logic has
it recorded (and i assume document.images[k].src would be correct, even
though the screen is not) as picture1. so.

is there a way to wait or surrender control to the system until the
program statement's intent has actually been rendered to the screen?
something i can test to see if the unerlying system mechanism has caught
up with all changes to document.images?

View 1 Replies View Related

String Logic - Add BBCode Into WYSIWYG Rich Text Editor

Dec 17, 2010

I've got this code to add bbcode into a wysiwyg rich text editor. Everything's working fine except when I want to add an image. The first time the script is run everything is ok, but the second time I get two image inserts, third time I get three and so on.

Here's the code:
Code:
$('#uploads tr').click(function(){
var filename = $(this).text();
var insert = '[img="'+filename+'"]';
textarea.value = textarea.value+insert;
$('#images').hide();
textarea.focus();
});

So first time I click on '#uploads tr', I get [img="filename"], then if I type some more stuff and then add another image, I get [img="filename"] 'Some more stuff' [img="filename2"][img="filename2"], then I'll get three image tags, then four and so on. I can see that it's something to do with the line I've highlighted, but I can't see why, or how to change it.

View 2 Replies View Related

Conditional Logic In Form Fields Hide/show Email Field?

Oct 18, 2009

For some security reasons I would like to show an email field in a form ONLY if the 4 checkbox are checked.I don't want to use server side coding so I need to use javascript.I have this code, showing an alert if the 4 checkboxes are checked:

<html>
<head><script>
var conta=0;
function ctr(quale)

[code]...

It works but I nedd to ask for an email instead of showing an alert.

View 3 Replies View Related

Spot Syntax / Logic Mistake - Should Open A Modal Everytime A Link Of A Given Class Is Clicked

Jul 29, 2009

It should open a modal everytime a link of a given class is clicked. But... it does not.

Code JavaScript:
//get the url of the link clicked
var url;
$('a.edit').livequery('click',function(){
url= $(this).attr('href');
});
[Code]....

When a link of class .edit is clicked, the overlay covers the page for an instant, then a redirect occurs to the page that should be loaded in the modal box (instead of the page being loaded in the modal). It's probably a small mistake as I can get it working the way I want using jqm 'trigger:a.edit'. The problem with this approach is that I lose the livequery power (links from ajax loaded content won't fire jqm).

View 5 Replies View Related

JQuery :: Using More Than One Selector?

Jan 26, 2011

I'm trying to create a drop down menu which has several levels. When a level is clicked on, other expanded categories in that level should minimize simultaneously. The trouble I'm having is using a combination of selectors to say 'all divs which match this pattern but not this one'. I've had a look through the selectors API pages

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved