Easy Question: Mouse over one class and Activate the :hover on another class
Upon mousing over one class, I would like another class's :hover css rule to be activated. My problem is in my main menu. When the mouse transitions from the main menu link to the drop down menu, the main link's :hover rules are deactivated. All I'm trying to do is retain that :hover state on the main link while the user's mouse navigates through my mega menu. This way the user doesn't forget which main link on the menu he/she is navigating under. Here's my url: http://72.32.101.216/ A good
removing div
Hi guys, just one question.I want to remove the div within ready function. I'm using $("noJS").remove(); script, but it only hides the div (when I check the site's code, that div is still there). Please, any ideas? Uros
Problem with my "switch case"
Hello, <form> <select size="1" name="categories" class="texte"> <option value="0">-- catégories --</option> <option value="1">lion</option> <option value="2">butterfly</option> </select> <div id="options"> <p class="lion" style="display: none;"> <input type="text" size="8" value="lion"/> </p> <p class="butterfly" style="display: none;"> <input type="text" size="8" value="butterfly"/> </p> </div> </form> $(document).ready(function(){ $("select[name='categories']").change(function(){
Expand/contract based on height of content
Hi all, I need to amend a small script that creates tabbed <div>s with content that varies in height. At the moment from what I can gather the boxes are all given the same maximum height based on the tallest content which can vary dramatically. Any help will be appreciated! Here is the script... function createProductTabs() { var maxHeight = 0; var $tabs = $('<ul id="product-tabs" />'); var $details = $('#product-details'); $details.find('h2').each(function() { $this = $(this); $('<li />') .append($('<a
Slide Up / Slide Down Content
Hi Everyone, I have this script where you can click through a number of divs which only shows one particular div at a time and hides the rest. So for example there are 5 links, if I click link1, Div1 will appear. If I click link2, Div1 will hide and Div2 will appear etc etc etc. What I cant figure out is if a link is showing how do I hide all of them so none are appearing. Im using the slideUp and slideDown function. Should I be using the Toggle function. Here is my script so far I hope someone
Jquery popup line windows.open
Hi All - I am new to jquery, and want to know if I can open an another page or a form in popup using jquery? Thanks
Multiple drop down problem
i am just a beginner in jquery and having this problem.... var array = result.sCitizenship.split(','); //array[0]= 1, array[1]=2 $("#citizenship").val(array); it is not selecting the multiple values in drop down.
multiple select
Hi, I am new to jquery stuff and having this problem.... var array = result.sCitizenship.split(','); //array[0] = 1, array[1] = 2 $("#citizenship").val(array); multiple select is not displaying .....
jquery css manipulation question.
Hi, i am trying to use jquerys .css to increase or decrease a elements left css value. When you press on a button/image the elements targeted would move right or left by decreasing or increasing the css left value for each element. How can I do this?
converting a js google map to jquery
Hi, I'm not sure this question makes sense, but I made this map using the google api: http://www.xelawho.com/map/ but I like the collapsible sidebar that you can make with jquery like this: http://www.xelawho.com/map/collapse.htm instead of having all those check boxes for the marker categories. So I tried copying and pasting code across but of course that didn't work, so I guess my question is if there is some sort of tutorial for converting javascript to jquery (which I think is what I'm trying
Problem with ajax jquery. Please help !!!
I use $.ajax() function to get data from server. success: function(data) {} data have 2 <div>. How can i take separate <div> in data ? Anyone can help me please.
Include Problem
Hi there I can't include a php file (with $.get) within my functions.js that is in the same directory. Everything else is possible. Root diretory, other sub directory, parent directory...is there any restriction by including php files within the same folder? I can't imagine, but it feels like this. Thanx, Max
Trouble getting Auto-complete to toggle checkboxes
Good morning all! I've been looking through all the documentation that I can find and have turned to forums as a last resort for this little qualm I'm having with auto-complete and toggling check boxes. So thank you in advance for your help! I am trying to use the jquery ui auto-complete widget to allow users to type in input, then based on their input to alter the state of a check box on the page. Eg. I have a checkbox input type="checkbox" name="dog" then I have an auto complete box who has
Hide / Show not working in select onchange - CODE CASEING NIGHTMARE
Greetings, I recently learned that the <option> tags can not use the onclick attribute inside of IE. This works great for firefox, but sadly not a single version of internet explorer supports it (from what I am told via countless Google searches). I have been modifying my attempit at a solution to use the <select> tag with the attribute onchange. Maybe I am casing this wrong, or not seeing a solution as the below code does not operate in any browser, and no errors are reported back through firebug
Should I pass back a data object or html when using ajax?
Hello, I'm successfully using the following code to return some html via JSON. $.ajax({ type: "POST", url: "myMethods.aspx/myHtml", data: "", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { processResponse(msg); } }); Now I wanted to store this html in a cookie for later use but as I'm using the .net framework I get issues with .net blocking anything that looks like script in a
Using css class as variable
I have a question about the proper syntax for using a css class as a variable. I tried this and it's working great... function populate_NC(countyClass) { $('.' + countyClass).append('<option value="Select">--Select One--</option>'); $('.' + countyClass).append('<option value="Alamance County">Alamance</option>'); $('.' + countyClass).append('<option value="Alexander County">Alexander</option>'); ... } But I'd like to use the same concept to remove the counties from the list. Currently
Question re: populating a field in a form
Here's te situation. I have a form that needs a specific field updated with a captured URL parameter. I can grab the parameter and I can assign it to a specific field using the following code: $("div.divName .genericClass:eq(1) input:.Textbox").val(OotBJob); The problem is all the fields are automatically assigned the same generic class, so I cannot look for a specific class and the field position can potentially change. Is there a way to find a specific form field by the text that precedes it?
Really stupid question but I'm new to these forums
I see examples of code in the forums and a lot of them have what looks like screen shots of their code with the line numbers and it's all formatted correctly. How do I do this because right now I just copy and paste code in this question box and it looks horrible and hard to read.
please help...
im new in using jquery,.,i remember that the first time i use this in ASP.net 3.5,.,everything is ok,.,then after sometime,.,i use this again but there's an error(warning) "Warning 30 Error updating JScript IntelliSense: Client-side script IntelliSense information was not generated due to an error in an external script reference. C:\D\Projects\Web\gmbWL22\frmMain.aspx 1 1 gmbWL2" how do i fix this?all i do was 1. download Superfish menus from 36 eyecatching jqeuries 2. Paste and add all needed
Implementing a submit button
I just found this site and I am looking for a method of installing a submit button on one of my web pages and having the button connected to an e-mail. I would create a form for patrons of my library to fill out and then the information from that form would be re-directed to a specified e-mail once they click submit. Is there plugin that would allow me to implement this and how would I find it on this site? Thanks, Jessica Hubinek
document.body = null
Hi I'm working with a Joomla site where I have included jQuery in order to have the basket follow the user as he/she scrolls down the screen. Since Joomla/Virtuemart also uses mootolls I'ce understood that there are som potential conflicts here. I believe that I have tried adressing these issues by using this code in a script element in the header: if (typeof jQuery != 'undefined') { (function($) { $(window).scroll(function () { handleBasketPos(); }); $(window).resize(function () { handleBasketPos();
How to replicate this select box?
Hi. Stumbled on this select box which I believe uses jQuery: I would like to know how to replicate it. I can see that there are background images and the search button is an image, but it's the size of the fields and the coloured dropdown background that I really want to understand. I'd also like to add an input field above the select boxes. Any ideas how to achieve this? Thanks in advance. Veronique
sequentially executing functions
hi all, I am making a web page which requires three main functions the layout is like this function main() { update(); showResult(); } function update() { setTimeOut('alert("process finished")' , 1000); } function showResult() { alert("updated result"); } now, my problem is when I am calling main() method, right now, if i call update() method, the showResult() method is also getting executed simultaneously. I dont understand how. I am unable to fix this problem after trying many things. can anyone
Getting value from a querystring
I need to check for a querystring value and then display a certain element based on that. I thought I cannot directly get it from jQuery code. So I created a hidden input box. Got the querystring value in it in the page load, then tried something like: if (hval_crevent.attr('value') = '1') { tab_crevents.show(); }But it doesn't work. How can I achieve this? Thanks.
dialog link disappears after onclick
hello, i have this code for a dialog box, <script language="javascript"> function dialog() { $("#dialog").dialog({ modal: true }).load("/;contact"); } </script> To contact us: <a id="dialog" style="text-decoration: underline" href="#" onclick="dialog()">Contact</a>this loads the contact form correctly, but the <a href> link disappears after i have made the click. what am i missing? thanks
how to do a conditional append?
Hi, I am making a form where you can either upload images or link images and upload a video. The problem is that I want a or situation. I made javascript function that when you click one of the 3 images it will add in one item this could be a image link or uploaded image or a video. There is only one function that runs and inside that function has if statements to figure out which one image was clicked. I have 3 images one is for image links one for uploading images and one for uploading video.
just learned JQuery, ran into problems...
I have a SQL database that contains a stored procedure that'll output data to a XML file every 5 minutes. The data outputted is always changing, while the format always is same. I wanted a page that'd use AJAX to pull the data from the server, check for existing data that was already displayed on the page, if so, update the data. If the data no longer existed in the XML, the data would be removed from the page. If there was new data in the XML but wasn't displayed in the page, it'd be added to the
fadeIn/fadeOut question
Hiya to All, I'm trying to apply a fadeIn/fadeOut effect on a menu. The fading works nicely; the problem is that I can't click on the submenu elements - as the submenu itself disappears as soon as the cursor is removed from over the parent li element. $("#access ul li.parent ul").hide(); $("#access ul li.parent a").hover(function() { $(this).next("#access ul li.parent ul").fadeIn(600); }, function(){
.append() .load() .get() Help please.
Hi, I am new to jquery and am having some problems trying to do something. Basically, from within my index page, I want to grab a specific section of code from another page and insert it into my index page.... does that make sense? I have been trying these two methods: 1) $("body").load("about-andrew-broomfield.html article.aboutPage"); and 2) $.get('about-andrew-broomfield.html', function(data) { $('body').append(data); }); The problem: In 1, where I use '.load', I can grab the section of
Read a remote web page with a form, fill the form & submit it
Hi, Is it possible to read a web page on some web site that contains a form. Then identify the fields in the forms. Then fills the fields with my data. and then submits the form as it submitted normally. I need to do this to automate for my final proyect , i need to fill many web pages remotly Can I do that using jquery? Thanks.
Update HTML with id attribute from database after $.ajax request
Hi all, I was wondering if someone could help me out with the following. I'm developing a webshop CMS in which you can create categories. By using jquery's ajax method I'm making a POST request to a PHP script which then handles all the data supplied to it. This works good and all except for the fact that after the query is being executed my HTML doesn't get updated, at least not as well as I want it to. I understand that the common way of working here is to update HTML in the success callback of
JQuery Google Charting - display vertical x-labels
Do anybody know how to make charts with x-labels in vertical position using Google charting ? I read somewhere that Google Charts API is not provide that possibility? Any workarounds? I need to fit a lot of long labels in a small chart. Thanks a lot.
Scrolling an UL within a div to a LI from external click
Hi Folks, I am new to jQuery and was hoping someone could help me out with this - I really don't know where to start. What I have is an automatically generated UL like this where each <li> contains information about a various subject or topic: <div id="container"> <ul id="menu-list"> <li class="item-1">contents...</li> <li class="item-2">contents...</li> <li class="item-3">contents...</li> <li class="item-4">contents...</li> etc...... </ul> </div> Elsewhere on the page are links which if someone
invalid assignment left-hand side
Hello friends I'm new at this forum. I am trying to assign some value to text filed using jquery. I am using this code. $("#tb").val() = "alpha"; its giving me this error (invalid assignment left-hand side) If i use this simple statement documetn.getElementById("tb").value = "alpha"; this works.. Please tell how to assign value to an input filed using jquery.
jQuery function return
Hi, I'm very new to jQuery, only picked it up yesterday, so there is very little I understand at the moment. I have a website on which I would like to display a real time, time-series chart displaying results from a database that is constantly updated. I asked for some help on stack-overflow about how to pull live data from my database and display it in an alert box on my sight. One of the replies said I should use jquery to achieve this. The code suggested is below function getNum() { $.ajax({
new class? or parent?
Hi, Looking for some pointers on how to access a subset of a class. The html comprises many divs with the same structure: <div class="h"> <p class="b1">text...</p> <p class="a2">more text...</p> <p class="b3">text text text...</p> <p class="a4">text etc etc</p>/div> Depending on the class of p (either 'a' or 'b', plus an integer), the parent div will have a style change, or an animation run. In javascript, you'd reach the parent divs like this: function changeH(abN) { for (i=0; i<elP.length; i++)
Effect of "hover" only after the fadeIn on page load ends
Hi everyone, i'm a beginner with jQuery and i need help. I need to have a series of divs fading in with different times and delay on page load. Each div has an image that is on "display:none". When you go "hover" a div, his relative image fadeIn and stay there. I've done that but the problem is that if you hover the div before it ends the "fadeIn" effect, his relative image will start to show up to. I want that the user can start the fadeIn effect of the image, only after the div has ended his effect.
How to stop a custom function?
If i have a custom function like this: function logoswitch() { var contentwidth = $('#content_all').width(); var content_alltop = $('#content_all').css('top'); if ((contentwidth) < '1250' || (content_alltop) > '749'){ $("#logo").hide();$("#logo_small").show(); } else { $("#logo_small").hide();$("#logo").show(); } } I can call the function like this: logoswitch (); My question is how can I stop it or undo the call of the function later? To get the state
Preview image before upload
Hello, I am new to jQuery & I am searching for the plugin which will allow me to preview the image before upload so that I can check it realtime. Is there any plugin available in jquery which will do this job for me? Please help me. Thanks in advance.
Superfish - Arrow issue
In IE8 and Firefox 3.6.10, my Superfish menu doesnt show Arrow for dropdown items. If I use compatibility mode in IE, it shows the arrows. Can someone please help? Also I am curious to know what does class="current" do in <li> tag?
Next Page