remove element of array that match string criteria
I have an array array = ['page1.aspx', pic1.jpg, pix.png,flash.swf,index2.aspx, pictures.gif]; remove = [jpg,gif,swf,png] How could I do to remove the elements that match the 'remove' list? Any help will be highly apreciated
Is my jquery wrong?
Hello everyone...!! Did I make mistake? Everytime I do request.getParameter("dataString"); ----> inside my JSP processor it always returned me NULL. Actually I do posting the variable dataString with a value; Take a look at this my jquery; (correct me if I'm wrong); var content; var dataString="ha"; $( function() { $.validator.addMethod("username", function(value, element) { return this.optional(element) || /^[a-z0-9\_]+$/i.test(value); }, "UserID: only letters, numbers, or underscore.");
After ajax load(), new content is not available to grab.
I am using the load() method to load navigation sections of hidden copy, which I will later grab and display. After the hidden copy loads, I am grabbing selected divs, and bringing them into an area where the copy will be displayed. My problem is that after I load the new copy, replacing the old copy, and I go to retrieve it, it gives me the old copy still (eventhough firebug shows me that the load() actually did bring in and replace the copy...so it's grabbing and displaying copy not even in the
Prev and Next links in Gallery
Hi, I'm rather new to JavaScript and have spent all day trying to figure out how I can make this possible by examining others code but to no avail. I've finally bit the bullet and come to ask for some help. I'm making a website for a friends photography and have managed to get a thumbnail gallery working as you can see here: http://tonyphipps.co.uk/lgenlloud/photographs/index.html. The problem is I have no idea how to get get the prev and next links working. I have tried countless searches for the
How do I pass jQuery object to function, and work with it?
I'm trying to build a function that accepts a JQuery object (a multi select drop down) and does stuff with it such as counting the non-zero options, etc, so I can limit the number of options the user can choose. How do I refine the object's attributes, once inside the function? The event is a select onchange and function call: "checkOptionsLength( $('#selectID'), 20)" function checkOptionsLength(obj,limit) { // How many non zero length selected options are there? // Outside of
Methods on tmplItem objects?
The documentation page for .tmplItem() lists all the fields on the returned object, but doesn't say anything about methods (so I assumed at first that they have none). The docs for .template() have examples, however, that call update() on a tmplItem. So … what exactly does update() do? Is it supported? Why isn't it mentioned on the .tmplItem() page? And are there any other methods on those objects?
on click function problem (very basic i guess...)
Hello, The problem can be seen here http://www.caae.cl/wordpress/category/accion-social The idea is that when you click on "+ sobre esta área" box (which is a div classed as "moretext"), it increases the height of the container that has the class "text-container" (which is the parent). But I can't get it to work, it triggers but then get back to the original state, and even changes some content on the site. Tried also, instead of using "parent", using the direct class, but's the same thing. This
Superfish and iframe video content
I have an issue where Superfish submenus are displaying behind iframe content. I know that iframes are supposed to work this way. Does anyone have a solution for getting the Superfish submenus to display above the iframe video? Firefox is the only browser that actually display it over the iframe. The others, Chrome, IE, Safari display under the iframe. Example: http://gm6-nsbaredesign.syscomservices.com/ Would the bgiframe plugin that works for select elements work for this?
Animating Document Resizing
Using: ASP 3.5 && jQuery 1.5min && jquery.scrollTo-1.4.2-min.js I am brand new to jQuery[p.s. i love you] I have a web form that has a list of items. When the user makes a selection the list may grow or shrink. When the list grows and the submit button at the bottom of the form is places outside below the view i scrollTo the bottom nice and smooth [this is all good]. What I am looking to do is mimic this in reverse. Currently if the list shrinks and form size shrinks the button stays at the bottom
form response gif not displaying
I am using JQuery to submit a web form, and the response isn't showing up if you leave an input blank. I know why this is happening but don't know how to fix. The reason it doesn't show up is I am using fancy CSS3 gradient background in my input fields instead of blank background. The CSS for my JQuery addClass if a field is left blank is: .element input.highlight { border:2px solid #9F1319; background:url(../images/icons/iconCaution.gif) no-repeat 2px; } but since there already is a
Help please. Elements still appearing in IE 8 and 7
Hi, I'm working on a self-contained educational tool. Every "frame" or "slide" is all in one HTML document. I initially start out with all frames hidden, and then show the very first one. The user is then able to click through to each next frame. This has been working great. Works in all browsers except for IE 7 and 8. There is one point when you click to go to the next section, and all the images and buttons appear at once, even though their respective parents are hidden. The kicker is that, if
jQuery Accordian and AJAX
Hi, I have an accordion and in one of the sections I am using the ajax NumericUpDownExtender. If I select the current index as the one with the NumericUpDownExtender in it then it works fine. If any other index is selected the ajax control does not load. Wondering what could be the issue and if anyone knows a fix for this? I was thinking about putting an updatePanel around the ajax as well but I'm not sure how to update the panel whenever the heading is clicked. I appreciate any help. Thank you,
*= css selector not working in IE7
The *= selector reads something like the ~= selector--which I also tried-- var tab1ErrCount = $("div#tab1 .errorMessage[style*=inline]").length; Basically give the count for all elements inside the div named 'tab1' with a css style that contains the word 'inline'. I do this to count the number of errors per tab. It works in Firefox ...not so in IE7. Guillermo Jimenez
copy <body> to <div>
I have pages A.html and B.html. On the A.html page, I have <div id="foo"></div> From B.html, I want to copy the contents of the BODY element into the foo DIV. What does jQuery code look like?
Hello, Id like to use a class and ":input" for an .each selector ,,,
How would this be done? Would it be something like this? var $inputCLS = ":input .textinputCLS"; $($inputCLS).each(function() { yadayadayada ... });
Replacing a Widget
To replace a widget I do something like this: First I create a new DOM element w. $(w).attr('id', 'gromet'); $('#gromet').after(w) $('#gromet').remove(); How can this work? Why doesn't it remove both the old and new widget. It seems to just remove the old one, perhaps because that's the first one it finds. I'm not complaining. This is working for me in multiple browsers. Is there a better way to replace a widget with a new one of the same id? I'd hate to get caught with bad code when someone "fixes"
image slider in IE won't align
Can someone take a look at this link for me? www.jarrettpayton.com/jquerytest.html For some reason this works perfectly in everything but IE. I am sure there is some simple fix for this alignment issue, I just can't figure it out Thanks
Popup window with dropdown
Hi All, I have a list of people and I need to develop a position moving tool that works in this way: User clicks on a person, a modal window pops up with a drop down populated with the same list of people. User selects a person after who the picked person will be moved to. User presses SAVE and the modal window submits data to file x.php and refreshes the page. Any ideas how I can get this to work?
Divs with different proportion - Mosaic View
Hello! First, sorry about the english, but is not my native language. Here's de deal: I would like to do a mosaic view with jquery, php and mysql, let's say that it would be 16 results per page: .... .... .... .... But the results would be nested in divs with different proportions(let's say that each dot is 1x1), 2x1, 1x2 and 2x2. I would like to reorganize it in a way that i did'nt get any layout errors. I found some references like: 1) http://jquerymosaicgallery.com/jmg_demos/one_down_two_up.html
.load() not loading remote HTML properly
I searched google and this forum and I couldn't see anyone facing this strange problem: I'm using .load() to refresh a page content from a remote file (in the same server) like so $('#load_but').click(function(){ $('#content').load('remote.html #content div'); }); and here's an example of the code in the remote page <div id="content"> <div id="what_we_do"> <p>We do this</p> <p>And this</p> <p>And this</p> </div> </div> This is generally working. However,
HOW TO: jquery form - if option is selected slidetoggle div?
Greetings, I am trying to make a form that collects "Number of Children" a parent has. If they select "4" from the select input, then I want to slidetoggle out the appropriate divs, one for each child. Code: <select id="NumberofChildren" name="NumberofChildren"> <option value="0">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> The div IDs to display are 1child, 2child, 3child, 4child,
Toggle Image
hello i got the following situation Ive got an link which opens a div onclick This link has a class for an image. Now i want to change this image if the div is opened or closed. Jquery has to change the class of the link between "open" and "close" I cant get it working Here is the link: <a onclick="ShowHide('#box-ext-order-id'); return false;" href="#" class="open"> </a> Here is the jquery script that opens the div function ShowHide(divid){ $(divid).animate({"height": "toggle"}, { duration:
Nested divs and click event handlers
Hi all, I have just started using javascript and jquery and I have a small issue; this might as well be an issue with javascript more than jquery, I am unsure about it. So I have a div nested in another div and click event handlers associated with both. I have two questions: 1. Is there any default order in which the corresponding event handlers are called? I would expect that when I click the inner div, the corresponding event handler is called first, but this does not seem to be the case. I need
Issue with two scripts
Hi, I'm having an issue with my website. I was on HTMLDrive.net looking for some cool effects for my site, and when I tried to put two of them in a page together it would not work properly. I can get only one to work at a time. It seems that they somehow interfere with each other, but I don't know how. Now have a little experience with JavaScript and jquery, but nothing I tried would work. Here is what I have in my page header right now: <!--Accordion Nav script--> <script type="text/javascript"
update the "tree view" and the associated "Data Table" values based on the selection from a dropdown
Hi All, I have a requirement to update the "tree view" and the associated "Data Table" values based on the selection from a dropdown. I want to refresh the page after getting the updated values when selecting the dropdown list. I am able to get the values from my controller and refresh the page by using "location.reload();". But while refreshing the page the drop down list value is again set to default one, hence I am again getting the previous page. Please suggest me to resolve this problem.
css('font-weight') returns 'bold' on FF,and '700' on IE?
http://jsfiddle.net/EBJf5/2/ On Firefox 3.6.15, it returns 'bold', and on Internet Explorer 8 it returns '700'. Is this expected behavior?
Should submit event be fired?
This is the html file. When 'Submit 1' is clicked submit event is fired. But, when 'Submit 2' is clicked the event is not fired. <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.min.js"></script> <script type="text/javascript"> jQuery(function() { jQuery("form").submit(function() { alert('submit'); }); }); </script> </head> <body> <a href="#"
I got nothing when i use the .load() function
i try to load a page like this <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script src="Scripts/jquery-1.5.1.js" type="text/javascript"></script> <script src="Scripts/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script> <link href="CSS/jquery-ui-1.8.10.custom.css"
AJAX latest request
Hello, I am writing an AJAX autocomplete function with jquery (and CouchDB + evently). I have a Input field and if a user types a text, i get an autocomplete sugest from the DB. The problem is, that because of CouchDB evently I have some restrictions. Every time, the user types a key, the following function is call: function(e) { var searchString = $(this).val(); var widget = $(this); $.ajax({ url : 'http://xyz"' + searchString, success : function(req) { var resp
DIV TAG not showing?? Please help?
Please help? Here is what I am tring to do. When you click on a hyperlink, it is suppose to load the content from a php page into a DIV tag in my html page. The code I have been trying is below, but it does not work. Pleas help me fix it so it will work, please? HTML PAGE <html> <head> <script type="text/javascript"> $('#msg1').hide(); $('#fr').click(function(){ $.get('messages/msg.php', function(data) { $('#msg1').show(); $('#msg1').html(data); }); }); </script> </head> <body> <a href="#"
how long
does it take before a question is published?
Remove a function from the memory
Hello It is possible to remove a function from the memory? I have a custom function that I call using modul.StepGuide.init() - but how do I remove that function with all its vars and events, from the memory. Thanks in advance MG
Problem using JQuery to obtain JSON from a web service
Hello, I have an application that calls a REST web service to obtain a JSON object. The call is: $.ajax({ type: "GET", url: urlWebService + "/getList" processData: false, crossDomain: true, dataType: "application/json", accepts: "application/json", beforeSend: function (req) { req.setRequestHeader('Accept', 'application/json'); req.setRequestHeader("Content-Type", "application/json"); }, cache: false, success:
Jquery Autocomplete extraparams
how to pass textbox value using jquery autocomplete extraParams
IE won't remove dropped draggables
I've set up a sortable list and a space where you can drag items to where they'll be deleted. The relevant code is as follows: [code] function initUI() { // Set up people list $("#people").sortable( { containment: "document", tolerance: "pointer", connectWith: "#del_space", update: function(event, ui) { updateList(); } }); // Set up delete space $("#del_space").droppable( { accept: "#people > li", drop: function(event,
Having some problem with executing functions correctly after load()
I have a gallery, with (client) categories, and then subnavigation showing different shots. When you click on the client, it loads the appropriate subnavigation from the page listed in the anchor tag. When you click on the subnavigation, it appends an <li> with the appropriate image, and slides the <ul>. Both of these work on page refresh, but the subnavigation functionality stops working after a new subnavigation is loaded. Please help. A link to the demo can be found at brianbattenfeld.com/fingers/work/dear.php
superfish dropdowns behind Flash content!
I am using superfish in a joomla site. It works great in Firefox and Safari, but not in Chrome or ie. The menu dropdowns appear behind the Flash Movie. I've implemented the fixes suggested here: http://brenelz.com/blog/squish-the-internet-explorer-z-index-bug/ but to no avail. any Ideas? http://sfm.alfydog.com doesn't work in chrome or ie
how to do it?please.
<style> body,h1,hr,ul,input,* { padding: 0; margin: 0; font-family: helvetica, arial, sans-serif; color:#748188; font-size:12px } #nav { width: 560px; position: relative; padding: 5px 0; height: 15px; margin: -26px auto 0 auto; } ul#nav li { list-style-type: none; float: left; margin: 0 32px 0 0; } </style> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script type="text/javascript"> jQuery.noConflict(); jQuery(document).bind("mousemove",function(e){
Dropdown like on Apple
Hey there, I was looking for a similar Dropdown (Help, Account, Cart) like on Apple Store. Could not find anything out there which works on Hover. The Layer should support also DIV and not only UL (LI). Note: Check the line with "Welcome to the Apple Store" thanks for help regards
Why doesn't my selector work?
Hi, When I click on a <div> it needs to open a colorbox for all links that are contained within the <div>: <div class="project"> <p>There is content here, but no links except the ones below</p> <a href="image.jpg" rel="gallery"></a> <a href="image2.jpg" rel="gallery"></a> </div> So I wrote a little function that should trigger the click event on the first A: $("div.project").click(function () { $(this).find("a").first().click(); }); But somehow, this creates a loop... Any ideas?
Next Page