Very new using jQuery. Anyway, I have the following few lines which create a component on a web page.[code]...
Upon some analysis, I can see that the css does contain the styles used by my div. So now, I would like to change the colors of the component, but I am not sure what is the best practice. Can one override in the div tag the colors, or should one duplicate the .css and change it?
Seeking the best way to perform this that other in the group use.
I have a drop down box that selects a project name. This is then taken to a javascript function that is supposed to fill in a read-only box with that name, but instead of filling it in with the project name, it fills it in with the project ID, which is how the sql database is set up. Each project has an ID, a name, and other values. Is there a way I can get the project name given the project ID in the javascript function?
I would like to use JQUERY API in one of my assigned project. I am looking for open source API only, please suggest me if I can go for JQUERY or not..?
I need to implement a next to last selector for our project. I came up with the following code: jQuery.expr[':'].next_to_last = function(obj, index, m){ var $this = jQuery(obj); return $this.find(m[3]).last().prev(); }; Is there any problem with this implementation?
I have a site [URL] in which i display project thumbnails on the right, by clicking it, i want that project id to open it's project photos on the left without reloading/refreshing the page. (the data/photos comes from the database using php & mysql)I tried doing that with ajax's XMLHttpRequest, but i can't execute javascript through responseText.
I am using jQuery.get to make an AJAX request to the server which should return a JSON object, but it is interpretated by jQuery as a string, not an object.[code]I do not use getJSON because I want to make one request which could return in a JSON object, or just a string, depending on some conditions.
This is my first jQuery code so I am noob at that case. I have created page with 4 tabs based on that tutorial:Each tab has form to fill out and submit. Starting on first tab, then if passed validation goes to next, etc. But when will not pass a validation I want to keep open that tab where the error occurred. My PHP code for the second tab looks like:
So I have the following form field: Code HTML4Strict: <input type="text" size="9" style="width: auto"> I do this, because in CSS I set all my input fields to 'width:200px;' (looks better), but also require some fields to be shorter (which I do by setting 'width:auto' and attribute size="x"). The problem with this is that I need to get the precise width of all inputs with jQuery!
But if I do the following: Code JavaScript: alert( $( "input" ).css( 'width' ) ); It outputs: 'auto' How do I make it return the element's actual width?
$(document).ready(function() { $('#menu ul ul li').prepend('~ '); });
This chunk of code is in a .js file that is link to every pages of the site I'm working on (called via an include). I linked another .js file to all the pages of a new section I'm developping. Is there a way to override or cancel the .prepend with my section specific .js file??
OK, so jquery code works fine on a sample test html page. However, when I try to execute the exact same code in my asp.net project, it does not work. I have included the scripts and the paths are correct so it has nothing to do with that.
That is the section of code it gives me an error on, it says " Object doesn't support this property or method"
Also, even before I run the project, I have a warning in my error list box that says: Error updating JScript Intellisense (C:~~~blah blah jquery-1.4.2.min.js
I'm trying to create a list, to which you can: 1. Add and remove items. 2. According to what's in this list, there should be dynamic content loaded on to the page.
I've accomplished 1 with the code below. I'm not sure about how to accomplish 2. <script language="javascript"> var listItems = new Array(); var currentList = new String(); function listManager(task, id, name) { //$("#debug").append(" ##### List manager. ("+listItems.length+" items) ##### "); if(task == "add") { refreshList(); // refresh the list .....
Now that we're switching to feature detection rather than browser detection, how does/should one detect for a webkit browser?Is there a known feature that we can check for that would Identify Safari and Chrome?We're running into some (rather minor) layout issues with some jquery plug-in rendered content in Chrome and Safari and it'd be really easy to just do a 'if a webkit browser, tweak this' type of logic.
I got a container as "inline-block", but cycle plugin change it to "block". It fuck up my page in IE. Is there a way to prevent it from overriding my display: inline-block?
I'm trying to force jQuery UI Tabs to work with browser locations (as in direct-linking or bookmarking), but having very little luck doing so. It feels like I've seen this question at least 50 times around the net, and the answer mostly consists of one of the following 5:
[Code]...
Hierarchically based tabs (hopefully something better than "level1-level2-level3") As I said, I know it has been asked before, but apparently I am now the only one struggling with this. So if anyone could give some suggestion on how to use jQuery Address, jQuery BBQ or any other method to accomplish this,
I'm trying to change the default required field message in the validation plugin from "This field is required" to simply "Required". I tried to do so like this:
[Code]...
but this isn't working. I'd prefer not to edit the actual code to change the message, although that is an option (but one that would mean constantly updating the message when the validation code is downloaded once again).
I have a DatePicker , and a dropdown on my page. When the page loads, the datePicker shows the current month and assumes that no value has been selected in the dropDown. Once the dropdown is selected, I need to reload the datePicker based upon some data returned.
My assignment for my programming class is to create a script using JavaScript that asks a user to enter a number in a pop up dialog box on their browser, and then tell them if they entered an odd or an even number. This is what I have come up with so far, whenever I test it on a browser it says that every number is even.
Here is a small test for all those hardcore JavaScript programmers. Is it possible to drag'n'drop a text/image element (eg. A or IMG tag) from one (I)FRAME to another (I)FRAME. This is easy & possible with IE's proprietary ondrag events. However the question is, is there a work-around using standard W3C/Firefox onmousedown, onmouseup, etc. events only? Code:
I am creating a particle system for WebGL and have created a class to generate individual particles. Since I wanted to control the rate at which these particles were generated, i put a setTimeout function to recall the method at a given rate. However, the setTimeout never fires and loops. I was wondering if anyone could help me. BTW the javascript has been designed to mimic OOP, so its kinda of a weird setup [code]...
I'm sure this is probably the wrong place to ask, but is there a way to execute an SSI script in javascript?
I'm using an SSI script to read a memory address, and I'd like to be able to update the value every few seconds without having to refresh the entire page. Does anyone know a possible way to do this, or am I stuck with refreshing the entire page every 4 seconds?
I want to override the onbeforeunload event so that when the user clicks on the close button, at the right top of the screen, it only open an alert with OK button and don't close the screen ...
As can be seen, the input fields have First Name and Last Name as the default values. What I would like to do then, is as soon as the user clicks in the First Name or Last Name field, that the field would blank out and allow the entry of the field. My JS looks like:
Code:
function clrFirstName() { document.fsearch.fname_search.value=""; }
[code]....
fsearch is the name of the form.When I click on the field, nothing happens.
There are two text boxes in a HTML form.The first text box takes the time when the user starts to work on a project. The second box takes the time when the user stops working on that project.Now, I would like to calculate the total time worked on that project for that user. That is (stop time - start time). I tried few things without success.
I would like to explore a project using javascript . The project is kind of similar to the 3D Room feature on mydeco [URL] and click on 'Design a 3D room' (about a third of the way down the page). The application allows the user to position 3D items in a 3D room as well as viewing that 3D room from two additional angles. I would like to create something similar but for a different use.
Basically it would have similar features as the 3D room but with the following differences: - There would be no 3D elements/images. All would be 2D. - The 3D room builder has a panel on the right which allows users to navigate to images via categories. My app would still have the right hand panel, but the images would be 2D - The rest of the window would just have a single main 2D image in it. - The user would drop/position 2D images from the right hand panel, on to the main 2D image. - There would be no need for additional views or for any rendering of images. - It would have the other functionality at the top of the window such as save, share, undo, redo etc. An additional function would be needed to allow the user to adjust images to be 'above' or 'below' other images. Also, is there any reason this app opens in a new window instead of running on the website itself?