[jQuery] Store a Css class as a variable?
Hi, I just started playing with jquery yesterday and I'm interested in assigning the css class of an <a> element to a variable and then applying that class to a div in another section. While I've been looking through multiple tutorials and searching on the discussion board I haven't seen it. i.e. $("#exampleClass a").click(function() { var className = $(this).css("background-image"); $("#TargetDiv").addClass(className); // where className is the variable }); }); Any guidance/help would be much appreciated!
[jQuery] jquery thickbox called from tickertape
Anybody called a jquery thickbox from a tickertape?
[jQuery] Nested Selectors
Hi Guys, Just wondering how many times you can nest selector functions like parent, not, has, etc I tried the following... $ (".someDiv .someSpan:parent(:has(input:checked))").addClass("hasSelectedCB"); and $ (".someDiv .someSpan:parent(:has(input:not(:checked)))").addClass("notSelectedCB"); The first worked, the second returns zero items. Anyone know if there is a limit to nesting these selectors or Is there a better way I should be doing this?
[jQuery] Context menus in Opera?
Hi, Does anyone know of a context menu or right-click override (jquery or otherwise) that works in Opera? I've found that the contextmenu plugin (http://www.trendskitchens.co.nz/jquery/contextmenu/) works great in IE and Firefox (though has problems being assigned to hyperlinks), but none appear to work in Opera. Cheers, Sean
[jQuery] access xml declarations
Is jQ able to access any of xml declarations (these before <! DOCTYPE )? I have document content like: <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet href="/public/css/style.css" type="text/css" media="screen, projection"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/ TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> .... and I'd like to get 'media' value from xml-stylesheet prologue. Is this posiible?. If yes - how, if
[jQuery] Proof of concept: Animated data grid/table jquery plugin with sorting and pagination and somewhat lightweight
My proof of concept http://www.overset.com/2008/08/30/animated-sortable-datagrid-jquery-plugin-jtps/ I haven't yet seen html scrolling animation like this non-flash or flex. This is essentially an unreleased jquery plugin that you can attach to an already created table that will allow for sorting and pagination. The animation is sensitive to the page delta, i.e. it will scroll faster if you go from page 1 to 5 than from page 1 to 2. The core of the animation is really a queued style.display: ( 'none'
[jQuery] Using jQuery to identify files for download
I am working on a website that has a large music collection with three different file types available to download in a member-only section. I would like to use jQuery to mark specific files for download and have them auto-tally in a sidebar, somewhat like a shopping cart. As I am new to jQuery I could use some pointers to information or resources that might be helpful in solving this issue. Thanks in advance for the help. Forrest
[jQuery] [Dropdown menu] Expand upwards!
Hello. I´m trying to make a tab menu with dropdown child menus. Nothing strange with that, just a nested unordered list like this: <ul> <li><a href="">Value1</a></li> <li><a href="">Value2</a> <ul> <li><a href="">Subvalue1</a></li> </ul> </li> </ul> Now to my problem/question: How to expand the submenu upwards? Please see this "what I want" picture. http://api.mediatechdesign.se/jquery/tab_expand_menu.png I have try with different types of animations, slideDown, but can´t figured out. $(".tabs
[jQuery] Not selector help
I'm looking for the quickest way to uncheck all of the checkboxes on a page except for one with a given idea. I realize I could uncheck all, then check one, but I'm curious if I can leverage not: to accomplish what I want to do?
[jQuery] different behavior with jquery1.2.6
Hello, I have an asp.net (vs2005) web-app. When i use jquery1.1.4, then, on submitting the form, the background gets grayed-out and an 'results being generated' image (that i have put in the asp.net code) gets displayed. i replaced the 1.1.4 file with 1.2.6, and now the background doesn't get grayed-out (aspnet code remains same, the only thing i changed was replacing 1.1.4 with 1.2.6) at all. The image gets displayed but since the background isn't grayed-out/"disabled", the user-controls kind-of
[jQuery] Anyone know why mouse position inside div is different in Firefox and IE
I have a div and I want to capture the x and y values when there is a click inside the div. This works great in Firefox and Safari but the offset seems to be wrong in IE7. There's a sample page here: http://static1.shopify.com/s/files/1/0003/0911/assets/testclick.html And this is the function that I'm using to get the x and y values: $("#special").click(function(e){ var x = e.pageX - this.offsetLeft + 1; var y = e.pageY - this.offsetTop + 1 ; $('#status2').html('x=' + x +', y='+ y); }); Anyone
[jQuery] make a div invisible when it is empty
Good morning, I am Graphic designer and I use Jquery with Moss (sharepoint) CMS Microsoft, developers of this gas plant have no sense of aesthetics code and optimization. I assumed that with a little magic wand, I was going to do div disappear when they are empty, then yes I could have use easily use. empty (), but generates sharepoint and I can not delete upstream. This small function is not much in this case. <script type="text/javascript"> $(document).ready(function () { $("#header div
[jQuery] Overriding original handler/callback on dependent autocomplete fields
Hi. I'm trying to deploy a form with dependent autocomplete fields in Drupal 6. The second dependent field is a Drupal node reference field which has its own callback function specified by a native module. Once the user has made their first selection, I need to prevent that callback from happening and execute the custom URI based on a new parameter. When drupal attaches the autocomplete behavior it checks to see if the behavior is already set via the autocomplete-processed class so I've tried unbinding
[jQuery] best techniques to optimize loading of multiple libraries?
First off hi! Here's the scenario: I have a banner that I'm going to put up on various different websites. The banner relies on the packed jquery core library, 1 plugin and another simple js file. Oh, and obviously, I can't host anything on the destination site's servers. What's happening is that every time a banner is displayed, all 3 javascript files and 3 images are downloaded and displayed on the page. Which works fine for 1 user at a time visiting 1 website at a time. Now, our goal is to have
[jQuery] jquery in rails/rjs files
Is it possible to use jquery in rails rjs files? I have a lot of files like: page[:item].replace_html render :partial => "foo" page.call 'update_basket' . . . I just looked at jquery and I would like to replace all my prototype code. But when I do not include prototype "page.call" does not work with an error message: "Ajax not defined" Is there a way to solve this problem? Thanx
blank page in IE
I have some problems with the form/validate plugins. If you check the following page: http://test.mittskift.no/ Click on "Kontakt oss" in the top menu. In FF, the form is visible. In IE the whole page is white... Any help, please?
[jQuery] jCarousel doesn't parse UTF-8 charachters
Hi, I've added some text to images in the jCarousel, but the javascript doesn't parse and convert the UTF-8 characters in the text. It breaks the text, or replaces it with ??? characters. Can someone help please with how to modifiy the javascript code to make it parse and convert the UTF-8 characters correctly. Thanks in advance. The javascript code is: ------------------------------------------------------------------------------------------------ function videos_itemLoadCallback(carousel, state)
[jQuery] jQuery search
Hi, I am looking for a jquery plugin that will show the results of a search form without refreshing the page. So when someone press search it wont reload the site but will show the founded results. Any one now a plugin? Erwom
[jQuery] jQuery dollar not defined
I can not find why $ (dollar) is not defined in my code. This is the include-part: <style type="text/css" media="all"> @import "http://jquery.com/demo/thickbox/css/global.css"; @import "http://jquery.com/demo/thickbox/thickbox-code/thickbox.css"; </style> <link rel="alternate stylesheet" type="text/css" href="http:// jquery.com/demo/thickbox/css/1024.css" title="1024 x 768" /> <script src="http://jquery.com/demo/thickbox/js/ jquery-1.1.3.1.pack.js" type="text/javascript"></script>
[jQuery] superfish indicators
Hey All! Yay for swanky drop downs! I'm implemented super fish drop downs on a site I'm building and I was wondering if anyone could help me figure out how to do away with the arrow indicators altogether. They're pushing my layout around, and I would really just like to rid of them completely without breaking the code. I tried turning to the background color, but they still take up space. The superfish dropdowns I'm using are highlighted here: http://users.tpg.com.au/j_birch/plugins/superfish/#examples
[jQuery] csssupport
I wrote a css 2/3 support plugin: http://pastebin.com/f7c6c1e82 Call it like this $('link[href~="css3.css"]').supportcss(2); sorry for my English ...
[jQuery] jquery validation plugin problem in textarea [validate]
I use jquery validation plugin from bassistance.de, but everytime i use it on textarea, it doesnt work (doesnt pass the value properly). Any suggestions?
[jQuery] digitalBush Plugin newbie...losing text onblur()
Hey, My boss talk to me about Jquery, never done that before. We need to mask HTML input for phone number and date fields. So, I found this plugin digitalBush MaskInput and it works great but I don't know why, i'm losing the data in the field when the input loses the focus. <html> <script> function geredate(id){ $.noConflict( ) jQuery(function($){ $("#"+id).mask("9999/99/99"); }); } function geretel(id){ $.noConflict( ) jQuery(function($){ $("#"+id).mask("(999)999-9999");
[jQuery] [autocomplete] every item shown regardless of letter typed
Hi! I'm using Jörn Zaefferers autocomplete, and happy day, using json as datasource is working! Sadly, I have not reached nirvana yet.... When I press a "s" for instance, the goal is of course to only show the items starting with "s". But no, every item is shown! What can cause this? Thanx!
[jQuery] jQuery + Gears Data Dilemma
Greetings, An application I've been working on is in the process of trying to integrate Gears support into itself. The application is heavily driven by jQuery, UI and an assortment of plugins. The support for gears involves a number of get and set type calls, where data is retrieved and populated in a form or taken from a form and stored some where. We'd like to keep the implementation open enough that down the road we can work HTML5 support and potentially even Adobe AIR support into the app. Right
[jQuery] I don't want to downoad a plugin
Currently I use jQuery and haven't downloaded the library, rather I am using the online version. So I have a link to my jQuery library. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/ libs/jquery/1.2.6/jquery.min.js"></script> But now I want to use the UI tabs plugin. (http://docs.jquery.com/UI/ Tabs) Does anyone know wether it is possible to use this in the same way so that I don't need to download the package?
[jQuery] Dynamic mask
<div dir="ltr">Hey All,<div>A problem so bad...</div><div>Can I change mask to <rich:inputText/>? Like this:</div><div> </div><div><div><h:inputText value="(#any)" </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>id="edt"> </div> <div><span class="Apple-tab-span" style="white-space:pre"> </span><rich:jQuery selector="#edt" </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>query="mask('999.999.999-99')" <!-- here change to "mask('99.999.999/9999-99')" dynamically</div>
[jQuery] autocomplete onfocus and other dynamic input
Additional Dynamic Input: I have two input fields. The user types in something in the first field, then needs to type something in the second field. That second field is an autocomplete and needs to send two pieces of info to the server - the current input and the value of the first field. Since the autocomplete is created on the doc ready, if I try to add the first field in the extraParams liek extraParams: {firstfield: ($ ('#firstfield').val())} it sets it as the value at the time the page loads,
[jQuery] position iframe elements in parent document?
I haven't tried this, but I'm wondering if this is even possible. Dragging a div from an iframe to somewhere outside of it. TIA!
[jQuery] jCarousel
Description of problem: Non fixed width thumbnails in a horizontal jCarousel Result: Ugly spacing / aesthetics. Example: http://www.glitteryourway.com/jcarousel/examples/static_simple.html (scroll all the way to the right where i inserted thumbnails of varying width) I’ve tested with a few similar scripts. Almost all of them will encounter problems with non fixed width thumbnails (say in a horizontal carousel). I’m trying to get this to work with jCarousel. Does anyone have a clue on how I could
[jQuery] Why this simple code doesn't work ?!?
Hi, I have this simply code and I don't know where is the problem: The script: ************************************** $(document).ready(function(){ $('#button').click(function(){ var data = '<input type="button" value="push" class="new_button"><br />'; $('#test').append(data); lets_go(); }); }); function lets_go(){ $('.new_button').click(function(){ alert ('hello'); }); } *********************************** And the HTML: ***********************************
[jQuery] Query String Object plugin help
Hi All, First time jQuery user and poster here. I'm trying to grab the value of a querystring using the Query String Object plugin. Here is my code (along with some 'curvy corners' jQuery): $(document).ready(function(){ $('.announce').corner({ tl: false, tr: { radius: 16 }, bl: { radius: 16 }, br: false, antiAlias: true, autoPad: true, validTags: ["div"] }); $('#reportOptions').corner({
[jQuery] need to display a number of items based on browser size, before i get to run any js
<div dir="ltr">Hi. Today, i've got a chicken-and-egg puzzle for your enjoyment :) In order to properly support google indexing of published content hosted by my CMS', which <span class="attribute-value">scales to browser-size, no matter what it is initially or how the user resizes it. Adding </span>meta info for the many pictures hosted via my CMS would greatly increase natural search results. In order to get them indexed, i need to provide google with URLs that contain the complete page's content.
[jQuery] sorting digits
<div dir="ltr">Hi all, Currently i am working on tablesorter plugin with jqery to sort column values in a table. My problem is when there is mixed data in a column like some numbers and "-" (when there is no data to display) its sorting the digits treating as string. e.g. in a column if the values are 7, 12, 9, 15, - then it treats 9 as a highest value. When i sort it it arranges like 9,7,15, 12, -. Please let me know the solutions. Thanks, <font color="#888888">Swaroop</font><br clear="all"> --
[jQuery] Select nodes with namespaced attribute
<div dir="ltr">I have a similar question to the one I posted here before, except this time I have no workaround. I have an xml document as follows: <node> <name at:datasource="xyz">John</name> <name>Jane</name> </node> I need to select all nodes that have the (at:datasource) attribute. The CSS3 selector is [at|datasource], but this doesn't seem to work in jQuery. Does anyone have any advice on how to do this? <br clear="all"> -- Luke Van In Alio Technologies <a href="http://www.aliotech.com"
[jQuery] Simple Templates
Introducing a new jQuery plug-in, Simple Templates: http://andrew.hedges.name/blog/2008/09/03/introducing-jquery-simple-templates One thing I have missed from my Prototype days (shudder, I know!) is simple, built-in templating. I know there are other templating plugins, but I liked the Prototype syntax, so I wrote my own. It's only 1009 bytes! Enjoy! -Andrew
[jQuery] Jumpy, unpredictable hover() in Firefox
Hi, I've got some hover effects in my menu that go a bit crazy, only in Firefox. It works fine in Safari (and IE, I'm fairly sure). //======================================================= // I slimmed this code down, but it's the same.. // Hide submenu only if it's not current, or not parent of current $("#menu .trigger:not(.current_parent, .current) > ul").hide(); // .trigger will slide open submenu only if it's not current, or not parent of current submenuTrigger = $("#menu .trigger:not(.current_parent,
[jQuery] a couple jGrowl tweaks
<div dir="ltr">Hey Folks,<div> </div><div>So... faced with the challenge of how to elegantly display query results on top of a google map (queries from assorted data services, such as geonames, etc), I settled on jGrowl. The look was right, the controls were right... just a few things I needed to tweak. I figured I'd post the problems and solutions in case they're of use to anyone, and in hopes that if someone knows of a better way to accomplish the same, they might offer advice, as I'm still rather
[jQuery] Needs help with Growl
Can someone please help me implement growl? I am struggling to find any documention for a simple implementation of this plugin. I have tried the standard code <script type="text/javascript" src="~/javascript/Growl/growl.js"></ script> <script type="text/javascript" src="~/javascript/Growl/ mootools-1.2b2.js"></script> <script type="text/javascript"> $(document).ready ( Growl.Smoke({ title: 'Window.Growl By Daniel Mota', text: 'http://icebeat.bitacoras.com', image:
[jQuery] error $ not defined
I'm trying to apply what I know so far to my CF page and an autosuggest input field. The very first line of javascript give an error; $ not defined $(document).ready(function(){ The java script files are included ( I checked that) The css files are included (I checked that) <link rel="stylesheet" type="text/css" href="js/ jquery.autocomplete.css" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.autocomplete.js"></ script> And this script;
Next Page