JQuery :: State Of The Art For Corner Rounding?

May 1, 2009

I have a half dozen bookmarks for rounded corner plugins, but am wondering if there's a "state of the art" plugin kicking any booty on that these days? What I'd *really* like is to just be able to set -moz border radiuses in CSS and have a plugin magically use those to create rounded corners in IE and Safari (IE mainly... using excanvas or something with it is fine, too).

View 6 Replies


ADVERTISEMENT

JQuery :: Why Does The Hover State Return To The Initial State

Nov 1, 2011

I used the code from the following article...[URL]

$(function() {
$('img[data-hover]').hover(function() {
$(this).attr('tmp', $(this).attr('src')).attr('src', $(this).attr('data-hover')).attr('data-hover',

[code]...

why does the rolled over image's src return to the original value when the user rolls back off it?

View 1 Replies View Related

Rounding Returned Value From Jquery.css

Sep 7, 2011

So just found out the problem I was having, and came up with a solution (bandaid really) but would like to know if anyone else has run into this and what they did.

Code JavaScript:
var left_margin = $(this).css('margin-left').replace(/D/g,'');

So the above, get the left margin of the object, strip all but numbers and store into a variable. Easy, right? Here's what happened. Inserted the object into the DOM, Chrome returned 212px, which was converted to 212�*fine. Firefox on the other hand returned 212.5px, which was converted to 2125� not fine. I'm centering the element on the screen based on this number, so the additional 2000ish pixels is WAY off. My solution was to increase one of my initial values a single pixel in which both browsers return 213px�*but like I said this is only a bandaid solution. Not really understanding the value of .5 pixel, but looking into that. Is there a rounding function in jquery? Javascript I would have to strip the px from the string, convert to integer and THEN round.

View 3 Replies View Related

JQuery :: Turn On An 'inactive-state' CSS Class For A Group Of Divs, Then Reset One Div To The 'active-state' Class?

Feb 2, 2011

I am attempting to make a menu that has a background image that changeswhen you rollover or click a menuitem. I've got the hover effect working fine with CSS, but am trying to implement the click event via jquery with the following:

CSS:
div.SustainResourcesMenuTabs
{ background-image: url('/images/departments/commdev/sustainability/menu_tab.jpg');
}[code]....

My process is to reset the entire menu to the inactive state, then switch on the active state for the item that was clicked. Eventually, the item that was clicked will display its corresponding body section as well. I've tried using the CSS pseudo-class "active", but since the entire div is the link, that is unavailable. I've also tried multiple variations of addClass/removeClass, toggleClass, and setAttribute/removeAttributebut nothing hasworked so far.

View 2 Replies View Related

Toggle State - Trigger Open State From Id Based URL?

Jul 21, 2011

To say I'm new to JavaScript is a bit of an understatement so bear with me. I have a site set up with a variety of layers of toggles. When you enter the site all of the items are collapsed and you click the headings to expand. Each of the toggle-able items have ids. It works great for users who start at the homepage.

However, when I send people to any of the inner topics, all they see is the initial collapsed state of the site. I want to be able to provide a URL that will set the toggle to open, and show all of the content for that section on entry.

Here is my code and js, can anyone point me in the right direction?

[Code]....

View 2 Replies View Related

Preserve The Session State Of A SharePoint Browser State?

Jun 1, 2010

How can I preserve the session state of a SharePoint browser state using javascript?

View 2 Replies View Related

Rounding ...

Nov 9, 2003

I have to round a fractional value from a form input to either 0, 25, 50 or 75. I have succesfully tested the value and stripped the decimal place. If the value is for example .1, I round it to 0. If the value is say .2, I round it to .25. My problem is that when the value is > .75, my function is returning undefined. For the sake of brevity I will include only the relevant code.

var increments = new Array(0,25,50,75);

CharBefore = parseFloat(CharBefore); //the whole number
CharAfter = parseFloat(CharAfter); //the decimal

var x = parseFloat(increments.length - 1) ;

for ( i = 0; i <= x ; i++ ) {

var testValue = parseFloat(increments[i]);
if (CharAfter > testValue) { continue ; }
else {
var lowerValue = parseFloat(increments[i-1]);
if ((CharAfter > testValue) && (i==x)) {

median = (testValue + 100)/2 ;
if (CharAfter >= median) {
CharAfter = Ɔ'
CharBefore++;} //round up to next whole number
else { CharAfter = testValue; }

}
else {
median = (testValue + lowerValue)/2 ;
if (CharAfter >= median) { CharAfter = testValue; }
else { CharAfter = lowerValue; }

}
return CharBefore + '.' + CharAfter;
break;

}

} // End for loop

View 6 Replies View Related

Rounding A Number

Jul 23, 2005

i have some file size in bytes, and i want to get it in KB or MB, with
one decimal digit, for example:1268777 -> 1.2 MB

now i can have 1.210000... my question is how do you can round this number properly, if i use Math.round(number), i only get 1 MB

View 3 Replies View Related

Rounding Off Numbers

Jul 20, 2005

Is there a script that will round off a number to a certain number of
decimal places?

View 22 Replies View Related

Rounding Inputs Up

Sep 27, 2007

The inputs for the fields of mth6, mth12, mth18, mth24, set50, set75, set 80 and set85.

I would like a way for it to round up to the nearest tenth.

IE:

from 2571 to 2580

from 148 to 150

ect.

any suggestions? Code:

View 5 Replies View Related

JQuery :: Getting Borders For The Div If I Used $('div').corner();?

Aug 9, 2011

i have the requirement as displayed below

i have 5 main divs in the above screen as Header, menu, content, login, footer. so i applied the corner plugin for it as,

$('#header').corner();
$('#menu').corner();
$('#content').corner();
$('#login').corner();
$('#footer').corner();

i dont want any borders for header, menu and footer as thse backgrounds will be in "fill" mode not in "no fill". so no need of border for these three. but i want borders for content and login divs. if i trying to display border for these two divs using css code border:2px solid red; am not getting the border in IE(Internet Explorer). But its working in FF and Chrom.

View 1 Replies View Related

JQuery :: Using Cycle And Corner Together?

Dec 15, 2010

I'm trying to use the great plugins from Malsup [URL], Corner and Cycle to make a simple fade transition slideshow from 5 images with 30 px right rounded corners - However, I cannot get both plugins to work at the same time; is it even possible?

Code example:

<html>
<head>
<style type="text/css">
#slideshow{
width: 720px;

[Code]....

View 2 Replies View Related

Rounding Off Percentage Values

Oct 27, 2010

I have a problem in my code which is as follows:

Code:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

[code]....

My problem here is that I am calculating the percentage values of a whole number and storing those values in text boxes respectively through javascript function.Now,what I need is that I want to round all the values to integer value such that the sum of integer values is equal to the final value.

View 2 Replies View Related

Can't Rounding Off Percentage Values

Oct 27, 2010

I have a problem in my code which is as follows:

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

[code]....

My problem here is that I am calculating the percentage values of a whole number and storing those values in text boxes respectively through javascript function.Now,what I need is that I want to round all the values to integer value such that the sum of integer values is equal to the final value.

View 3 Replies View Related

Rounding To Nearest 5th Number

Apr 26, 2011

I need help with figuring out how to round to the nearest 5th number.For example, if I had a variable with the value of 42, how can I round that up to 45; another example being 37 to 40.

View 9 Replies View Related

JQuery :: Displaying Image In Top Right Corner?

Nov 2, 2009

i am pretty new to jquery and hope this is the right place to ask. my problem is the following. when i mouseover a certain element on a page, i want that a certain image is displayed in the top right corner of the page, no matter where the it is currently scrolled. how can i achieve that?

View 1 Replies View Related

Jquery :: Unable To Get Round Corner ?

Dec 3, 2010

i am using this jquery module to get rounded corners.http:[url]....This is my code. but i am not getting any rounded corners though i have correctly included the 2 .js files and have specified the correct div id name.

Code:
<script language="javascript" src="jquery.corner.js"></script>
<script language="javascript" src="jquery.js"></script>
<script language="javascript">[code]....

View 6 Replies View Related

JQuery :: Put An Icon In The Left Top Corner Of Titlebar?

Aug 10, 2010

how to put some icon in the left corner of title bar, just before the title?

View 4 Replies View Related

Rounding Figure And Have Only 3 Digits After Decimal Points

Nov 8, 2009

Suppose I do (5 * 0.039) + 0.59, then the result is 0.7849999999999999 - but I want to round it upwards and should have only 3 digits after decimal point. I found out that using toFixed(3) will get it to be 0.785, but the problem is that it add x.x00 for some numbers where there aren't much decimal numbers. Is there a way I can remove the 0's?

View 9 Replies View Related

JQuery :: Corner Plugin - Loading Pictures With Lightbox

Aug 2, 2010

I have a problem on a Wordpress website: I gave certain pictures (as elements of the layout) rounded corners with a jQuery plugin. Some posted pictures I want to load with Lightbox (or similar). I have used several different Lightbox plugins for Wordpress (Lightbox 2, jQuery Lightbox, Simple Lightbox etc. etc.) but none of them work. I got some weird version of GreyBox working but FireFox gives an error every time before opening it so that's real shady code. As you can see on this page is that I include jQuery for the rounded corners at first but then the Lightbox plugin automatically adds it's own version of jQuery and they cancel each other out. I know for a fact this is the problem because I 'lose' the rounded corners as soon as I turn ON the Lightbox plugin. Once that is turned off the nice rounded corners show again. I tried several different plugins, changing the order of the jQuery code around, making both the rounded corners plugin and Lightbox rely on one single jQuery statement. Nothing has worked so far.

View 1 Replies View Related

JQuery :: .corner.js Plugin Not Working With <input> Elements

Aug 25, 2009

I must have missed a bit of information, because I cannot get the jquery.corner plugin to work with <input> html elements. The following renders a rounded div but not a rounded input element in FF3, IE7, IE8, and in fact causes the input box border to disappear completely.

<html>

View 3 Replies View Related

JQuery :: Scroll Text In The Upper Right Corner Of Page?

Feb 14, 2009

Is there a jQuery method() that will scroll text just like in the upper right corner of this page?

View 2 Replies View Related

JQuery :: Display Image In Center Of Screen Not On Right Bottom Corner?

Nov 29, 2011

i want to do effect (overlib) like this [URL]

but i want to display image in center of screen not on right bottom corner.

View 2 Replies View Related

JQuery :: Corners In IE6 - Error That Is Produced At The Bottom Of The Article Corner?

Dec 17, 2010

this jQuery plugin nearly works in IE6. You can see the error that is produced at the bottom of the article corner. (I'm tackling the other issues... .png later) http:[url].....

View 2 Replies View Related

Resolved Retrieve Number From A Form Input And Return It After Rounding?

Apr 10, 2009

I have a order form that adds up all the input boxes (45) and then totals them using function updatePrice() (which works) Im trying to have the output as XX.XX and cant figure out how to get the number from the id=txtTotal into the function round() and return the formatted number to txtTotal.

[Code]...

View 4 Replies View Related

Jquery :: Css3 Animation / Couple - When Hits Top Right Corner Flip 180 Degrees And Drive Back In The Other Direction?

Oct 4, 2010

How can I animate this car: driving from left to right of the screen? I imagine it starting on the outside of the wrapper border so top left 0 and ends top right 960px... When it hits top right corner can it then flip 180 degrees and drive back in the other direction? Also how can I do it in jquery for the browsers that don't support the CSS3? I was also wondering if you click on the car could some flames shoot out the exhaust which makes it drive faster??

View 9 Replies View Related







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