using conditions
Hi all, i am trying to create a button that will toggle the background color of my webpage from white to grey and back again. so, every time the user clicks, it the backgournd it white, it will turn grey. if its grey, it will turn white. i figured out (thanks to Tom Kenny here ) how to change the color but i would like to add to that code a condition that checks the current background color of the website or the current background class. i know it cannot be complicated but for some reason it got
Problems at installation
Hi all, I have just started, to use the jQuery framework. First of all I downloaded the file "jquery.tools.min.js" from the Flowplayer website and and included it in my document head. <script src="/common/js/jquery.tools.min.js"></script> But I get error message in my firebug console "jQuery is not defined". Ok, asking Google, it says, that mostly the path to my jquery file must be wrong. In this case I'm sure the path is correct, because the error message is thrown from the file "jquery.tools.min.js"
[jQuery] Superfish menu, Newbie in despair
Hi Joel, hi everybody, this is my first post here, thumbs up for this great component. I see the demo and I love it, but... After a long trial&error css tweaking with firebug, i still cant get what i need (i usually do after a while). I tried to read all your stuff on the web, but its not all very aprehensible for me. I am not very good at coding (pretty obvious by now, i suppose). Actually I need my vertical menu to be the same as in your example (with arrows and shadows), only with different colors.
JS ~OO ?
Sorry if this isn't directly pertaining to the jQuery API but more over to JavaScript in general. I like to keep it elegant so I'm trying my hand at OO-like JS. (much props to Stoyan Stefanov for his book Object-Oriented JavaScript). My main issues are (obviously) with scoping. Given: function SexyObj() { this.sexyFunction = function(){ alert('Too Sexy')}; //initialize (function() { this.sexyFunction(); }(); }; So, i'm trying to initialize
The use of events in jQuery
Hello, i try to use jQuery for the first time. Most things are self-explanatory but I am stuck on the use of events. Example: function foo(){ var html = '<div id="mydiv">'; html += '<input type="text" id="myid" name="myname" />' ; html += '</div>'; //adding html to document $('#bar').empty().append(html); //now adding events $('#bar div').dblclick(function(e){dosomething(e)}); } function dosomething(e){ //How do I get the id of the div here? //this.id doesn't work and e.target.id returns //the
jQuery OO(typeof)P - The jQuery Way
So i'm looking for "The jQuery Way".. :). Looking for a consensus on "best practice"/patterns here. 1) Namespaces: I'm doing MVC namespaces wherein my views have all the "classes" dealing with the traversing of the DOM and element definitions; models contain ajax calls and data binding (?) management (cookies, etc); controller space has an Observer pattern managing events, etc. 2)Constructor - Dynamic Prototyping: I've had to do some rewriting here. I was doing straight constructors though I read
how to "decode" the jQ error messages
Have started to develop a widget to be used with FX/TB etc using HTML/JS/JQuery. I use Firefox/Firebug to display the widget. Also Firebug doesn't display an error, the code -- located and executed locally -- throws a lot of warnings (see below). How to "solve" those issues? I don't see any reference to my "code" (html, js, css) Thanks for helping Warning: reference to undefined property persistedState.panelState[panel.name] Source file: chrome://firebug/content/firebug.js Line: 1281 ----------
how to Script the hover and click states ?
I don't know where to put the hover code as for the buttons to interact while i hover over them where should I put this code ? .hover( function(){ $(this).addClass("ui-state-hover"); }, function(){ $(this).removeClass("ui-state-hover"); } ) Thanks !
.hover problem, using the buttons
I am using styling button and toolbars with the jquery UICSS Framework and it seems to be working fine but since I am new to this I don't know where to put the hover class, help is needed...thanks .hover( function(){ $(this).addClass("ui-state-hover"); }, function(){ $(this).removeClass("ui-state-hover"); } )
jQuery Client Templates / Data Binding Question
First of all I'm rather new to jQuery. I'm developing an html/JavaScript/CSS Ajax client (that needs to run in different mobile browsers - Safari on iPhone as the most important one) using jQuery that accesses ADO.NET Data Services (for CRUD operations). I know Microsoft has today a beta ASP.NET Ajax library, but are there any other solutions to achieve the same (accessing ADO.NET Data Services / client templates / data binding? Thanks.
how to use jquery on vs 2008?
is jquery has intellisense like that? and can be coded from a separate js file?? that will be bind at the header?? thnx..
$('a').trigger('click') vs $('a').click()
is there a difference between $('a').trigger('click') and $('a').click() ?
JQuery / PHP / CodeIgniter web developer... !!! My first post in this forum
Hi, Dear all members, I am ZeeShan (Lahore-Pakistan) and i am new to this forum. As profession i am a PHP web developer using Codeigniter framework to create dynamic and interactive webistes. I have very good participation in Codeigniter forum I am using jquery more than one year but i didn't join this forum before. I love to get and help others. Hope i can get and share lot of things regarding to JQuery here. Thanks a lot ! ZeeShaN http://www.twitter.com/ZeeshanRasool
Using Firefox ::::::::problem
i face a problem to useing jquery(i am new in JQ).i am using wampserver as a localhost and dreamwaver and jquery 1.4 (development vresion).In my internet explorer(8) when i run any localhost file using jquery it's working.But in Mozila FF (3.5.6) when my Internet connection is off then it's not working .But when i on the connection it work as like IE.
Need som help to modify this script.
Hi! I found this very userfull (edit in place) script and i would like to make som modifications to it but i dont get it to work propper. What i want to achive is that when you are clicking the "edit" button my <p>hello there</p> becomes <p><input type="text" value="hello there" /></p> I managed to make it convert to an input by using .replaceWith but a cant get it to change back when i press my save och cancel button. And i also dont understand how i can include my prevValue var inside value="
Is jQuery included in browsers?
Is jQuery already pre-installed in web browsers like Internet explorer? For example, after I installed Internet explorer and I went to a adobe flash website, it said i needed to download and install the Flash plugin, but when I went to jQuery websites it works straight away, so is jQuery pre-installed in Internet explorer and all the other browsers? And what happens when a new version of jQuery is released like jQuery 1.4, does Internet explorer and other browsers automatically download this?
parentNode using jQuery
I am trying to get the parentNode using jQuery. While I can get the parent object, it does not appear to be the same thing as parentNode. I really need some help. I have a row in a table that has an icon. User clicks on the icon. In the event I using $(this).parents("tr"), to get the parent row for the icon. It finds it correctly, however, when I go to use it as a "node" with a plugin, it is not recognized as a node. On the other hand, if I use javascript in the document and do $(this).parentNode.parentNode,
is this line correct ?
please correct me if im wrong I downloaded a supersize plugin somewhere on the net then I try to put it into a page containing a slider plugin, I try to resize the whole 4 images in the slider to fit the page using lines below: should i write it like this ? <script type="text/javascript"> $(document).ready(function() { $('div.slide').get().supersize(); </script> or like this ? <script type="text/javascript"> $(document).ready(function() { $('div.slide.supersize()').get();
Coda slider nested in an accordion
Hello! I created a page with a working accordion, but then I added a coda slider to one of the accordion tabs, and now the accordion does not work properly. . . I can't figure out what the conflict is. . . any help would be greatly appreciated. the page with the properly working accordion is http://misswakes.com/shimsham/2/ the page with the properly working slider and the wonky accordion is http://misswakes.com/shimsham/2/index2.html Thank you!
Problem with easing in IE
Hello all I've made this website for a friend and the main problem I'm having is that the right vertical menu I made using 'easing' doesn't work in IE. Can anyone suggest where may have made a bit of a stuff up that might cure this problem? Grr I hate IE. I'm very new to jquery but think it's great btw Thanks
qUnit Tutorials for the novice
I recently became interested in qUnit and can say the documentation and tutorials provided on jQuery.org aren't enough for someone who has never unit tested before. I feel like qUnit is something that someone (such as myself) who has an intermediate/basic understanding of javascript and the jQuery library could tackle. Am I wrong about that? Or is an advanced background in javascript expected? Can anyone recommend more resources to start learning this that is more in depth and perhaps has more of
New api organization is confusing
Hi, When you click on the left hand menu, the menu gets replaced by a laundry list of stuff... what happened to the old structure?
Close dialog from within
Hi, Could someone tell me how can I have a button in the dialog that would close that dialog. I don't know if it matters but this is the script that I use for creating dialog: <script type="text/javascript"> $(document).ready(function() { var $loading = $('<img src="loading.gif" alt="loading" class="loading">'); $('#links img').each(function() { var $dialog = $('<div></div>') .append($loading.clone()); var $link = $(this).one('click', function() { $dialog .load($link.attr('name') + ' #content')
setting a variable to use within JSON. Please help
Hello all, Code: $(document).ready(function(){ //alert('Document is ready'); $("#submit").click(function(){ //set error messeges var errNumeric = "Only numeric(1-9) characters allowed."; var validate = { "validateRules": [ { "fieldId": "registration", "errMsg": "errEmail",
Very Simpe Questions - why I am not able to change the color of span element
Hi, I have all the Javascript to change the color of a span ID. But why clicking on the span does not change the color? I think all I need to include is the jquery-1.3.2.min.js file to make the Jquery work. Kindly explain. Thanks. <script type="text/javascript"> $("#someID").click(function() { $("#someID").css("color", "red"); }); </script> <span id="someID">Some Text</span>
help with making event happen on second click
Hi, Does anyone know how to make a function happen on the SECOND click of an element? Thanks!
request for help - don't know how to use jquery - would like someone to write this for me and tell me how to use a plugin on a web page designed in frontpage.
I am looking to put a notched slide bar on my web page developed in frontpage. Here is the design description. This page will allow people to move a slider to different positions—perhaps 3 to 5 positions. So we are making a slider with “notches.” Diagram. <>--------------------------<>--------------------------<>-------------------<> Each <> is a “notch” that the slider will land in. When the viewer moves the slider into a notch, he will see a different version of a short piece of writing.
Understanding call arguments
Hi, I'm having difficulties understanding how arguments are being passed to a specific plugin. The code I borrowed is from Custom jQuery selector for finding usable elements. I embedded the code inside a wrapper fn to reset the focus after some user interaction: function setFocus(cont) { // Fired on tab change. // Set focus on first usable element within container cont. usable := visible and not disabled. $("#"+cont + " input:usable:first").focus(); };
Problem with numbers... jQuery or JavaScript ?
Hi guys I've been fighting with a function that uses some plugin to get numbers from some fields in a specific form. After some time, I found some example code that added "* 1" to the value for treating the value as number. I mean: var total = jQuery("#myfield").val() + subTotal;was not working, while this code var total = (jQuery("#myfield").val() * 1) + (subTotal * 1);worked perfectly... Why is this problem? Any reference? Any plugin that can solve this? Maybe a math plugin?
jQuery Shell Extension for Chrome
There is a Chrome Extension available that will allow you to experiment with jQuery 1.4 commands on any web page in the Google Chrome browser: https://chrome.google.com/extensions/detail/cbbihnlpjnikhccblfddkbddcggagbci Great for experimentation and learning.
Dynamic File Tree
Hi, I am new to JQuery and please seem my use case here. I am currently working on listing Dynamic Tree list by using JQuery column navigation plugin. Please refer the following link to check the plugin demo page: (Note: The demo is not a dynamic tree list) http://source.polaris-digital.com/column-navigation/ (demo page) http://plugins.jquery.com/project/column-navigation (got from here) I am trying to create trees dynamically and need some help regarding this: What I am doing is, I have the following
http://api.jquery.com -- updated for jQuery 1.4 ?
Has the API site been updated for 1.4? Really? Then where is $.Proxy() ? Several others missing too. **--** Steve
Determing table cell values
I have a table cell with numeric values which are getting evaluated inconsistently. It's pretty straightforward what I'm trying to do but the Css class is being applied only in some cases. I've looked at the html source code and verified that actual value in the table cell. I'm not sure what I'm doing wrong. Thanks //DirAge - Age var DirAge = parseInt(jQuery("#DirAge").text(), 10); if (parseInt(DirAge > 70)) { jQuery("#DirAge").addClass("bgHighlight"); } <td id="DirAge">72</td>
Dynamically generate string within HTML code?
Hello, I have searched various sites and haven't found anything I can extrapolate a successful answer from. Either that or my spectacle wearing is justified and I have forum fatigue. Here is my issue: I need a dynamic string within a line of HTML: <a href="#" onClick="$.scrollTo('#xxxjump', 800, {easing:'elasout'}); server sidejavascript:animatedcollapse.toggle('xxx')" id="xxx-toggle">Next</a></div> The reason for this is to provide extra navigation. The triple xxx's would be a default of a three-digit
.load not working
I have a page that the client want users to be able to change from english to spanish and vice versa. The fade out and fade in functions are working fine but the content is the same as prior to the click . I am not sure why. I have tested the php page and it works fine. The link to this page in question is oncall. Only one of the bio's has this option. Does .load require an additional plugin? Can someone tell me what I am doing wrong? $("#englishBtn").click(function() { $("#bioTop").fadeOut("slow");
Tabs : show/hide multiple divs on tab click
I have tabs setup on a page but I'm trying to have another div show up in the sidebar when a user clicks on the tab. I can't wrap the ul and the sidebar together.... example: A user clicks on the 'investment consulting' tab, all of the 'investment consulting' info shows up in the main-content div (typical tab/content stuff)....At the same time, the pricing for the 'investment consulting' will show up in the sidebar, which is a completely separate div.........there are 3 consulting services and 3
How to know the browser width and height on each browser ?
Hi, for now, I'm doing this with this code : var navWidth, navHeight; if (self.innerWidth != undefined) { navWidth = self.innerWidth; navHeight = self.innerHeight; } else { navWidth = document.documentElement.clientWidth; navHeight = document.documentElement.clientHeight; }The problem is that it's not working on Android browser :/ How can I fix that please ?
Reloading all javascript, but not the entire page
hello, so i got a problem, in my page is gallery script, voting sistem and coments. So when you opening window, everithing is ok, but the problem is when you try to vote, or coment with iexplorer. Let's say, you try to coment, when do this, some part of the code are reload with ajax, and than all javascript stop working. This problem is for all versions of iexplorer, but works fine with firefox, opera, chrome or safari. So i think, maybe here is some special function who will realoading all javascript,
Would like to pull text files into page without php - all files in same folder - possible?
Hi, if I have all my plugins, html, css in the same folder is there a plugin or method I can use to pull in text from standard text files? My text currently goes in a lot of these. <li class="sub" id="idea1"> <h1>a paragraph of text goes here</h1> I've search for a lot of things and it seems it may be possible to make editing easier and also hopefully without changing my code much or at all. thanks!
Problem with mouseover
I have the following scenario... When I hover over span.share-this, it triggers a div called 'under' to come into view. This bit works exactly the way I want. Now I set it so, that when the mouse cursor is on the 'under' div and I mouseout, the 'under' div goes away and everything is back the way it was (Everything is still dandy). My problem is that when I hover over the span.share-this and do not navigate to the 'under' div, but navigate away to another part of the page, the 'under' div is still
Next Page