how to return values from function.
the code below checks an array of objects for a name in one of the objects and if found it returns the index number if not returns false, but im having troubles. 1. what is the correct way to skip to the next iteration of the .each loop 2 what is the correct way exit the function this.nameExists =function(attributeNodeClass){ $.each(list, function(i,anc){ if(attributeNodeClass.name==anc.name){ return i; }else{ } }); return false; }//END this.exists =function()
how to search an array of objects
with an array of objects how would you check a string within the array function AttributeNodeClass(name, type, klass, description, controls) { this.name = name this.type = type this.class = klass this.description = description this.controls = controls this.dump = function(){ console.log(this) } } function ANCList() { var list = [] this.add = function (attributeNodeClass) { list.push(attributeNodeClass) return this } this.dump = function
navigation menu slideDown based on url
hi, trying to get a vertical menu working. I'm trying to show menu-items based on the url. Guess I've got the current URL right based on: $(location).attr('href'); But I can not seem to get it working/debugging. Appreciate a hint in the right direction. This is what I've got: UPDATE changed the code but still not working. If I'm on page "A-Second" and in my sidebar click on the visible A-Third (the b-section is collapsed) then.... on this new page A-Third it is my goal that the sidebar shows A-First,
Edit box control with low level events
Hi, I am a C++ developer new to web development. I want to build some hmtl5 apps for prototypes. Currently I would like to do this : 1. I have a few edit boxes. The edit boxes should be written right to left. (As each character is typed the text in box grows leftwards). 2. I should be able to set the font size. Change the edit box borders 3. Set the cursor position anywhere in the editbox 4. When the edit text is changed I need a notification. 5. The alignment of these edit boxes are precise
why would Jquery print differently to console.log
Why would the Jquery below print differently in chrome than JSfiddle? function AttributeNodeClass(name, type, klass, description, controls) { this.name = name this.type = type this.class = klass this.description = description this.controls = controls this.dump = function(){ console.log(this) } } function ANCList() { var list = [] this.add = function (attributeNodeClass) { list.push(attributeNodeClass) return this } this.dump = function
how to list an array of objects
how would you "dump" the content of array of objects below function AttributeNodeClass(){ this.name=""; this.type=""; this.description=""; this.controls=""; this.class=""; } function AttributeIteratorClass(){ this.attributeCatalog = new Array(); this.add = function add(oAttributeNode){ this.attributeCatalog.push(oAttributeNode); }//END function add(oAttribute) this.dumpThis = function dumpThis(){ for(i=0: i< attributeCatalog.length; i++){ console.log(attributeCatalog[i].name);
JQuery conflict
Hello, I have a serious issue with JQuery conflict on my site. I've installed and setup an accordion slider which conflicts with the template I'm using. This causes some terrible problems for me. I've read about adding no.conflict to the code but I've got absolutely no idea where to put the code and how. Is there any thing you can do to help me with this? The module I'm using is a Joomla module name JB Flex Slider - http://joombest.com/item/2-jb-flex-slider-responsive-joomla-module And the template
tried testing AJAX Country, State, City DropDown List and got error in the console
When I tested this Code (Country, State, City Dropdown List) I got an error in the console Uncaught Syntax Error : Unexpected Token . ######################################################################################### This is an AJAX Country, State, City DropDown List <HTML> <HEAD> </HEAD> <STYLE> #SRCHORDERS{ position : absolute; top : 100px; left : 20px; width : 100px; } </STYLE> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <SCRIPT>
Help with assigning an attr to a variable
Hi. Ive just started taking some javascript and jquery lessons and we have been assigned a little project: an image galery. so i came up with the following: when i click any button with the class "thumbnail", i want to set the src of the thumbnail to a variable, and then set that variable as the src of the main image (#imggrande"). I am having trouble finding an answer on how to assign the src of the image clicked to the variable. $(".thumbnail").on("click", function() { var imgpath = ????? $("#imggrande").attr("src",
AJAX Cross Site (XSS) JSONP Object Exchange between Client and Serverskript in PHP
Hi, I try to exchange a variable and an object between client and diffrent servers. I created the small example below. If I call the localhost server everything works fine. The same serverskript is not working and the object is null if the server is somewhere else than localhost, but the variable event is passed well. Here the answers: localhost: onSuccess({"gleich":true,"eventObject Event":"start","event":"start","team":null,"First":null,"eventObject":{"minute":10,"event":"start","person":{"first":"Vor","last":"Nach","nr":"3"}}})
jQuery examples don't work when running on my localhost
Hi all, new here. I'm working through the examples in the API section, and though they work fine from the jquery.com website, when I copy an example (demo) and store it locally, it will load into my browser, but it will not do anything when I click on an element. For example the click demo. Is there some wrapper I have to put around the code to make it work? I have jQuery code examples from wrox that work fine, so I don't think it's my local configuration that's at fault. Windows 7, Firefox, XAMPP.
JSON Question
Hi, in XML you can do somethign like this: <xml> <persons> <person> <name>a</name> <lastname>b</lastname> </person> <person> <name>c</name> <lastname>d</lastname> </person> <person> <name>e</name> <lastname>f</lastname> </person> </persons> <endresult> <result>122938</result> </endresult> </xml> Is this in JSON possible too?
slide in from right, and fade in
I am creating a registration form, and would like one step to fade out to the right, and the next to fade in to the right, center of the page. One of the issues that I've noticed is stacking. As my setup is right now, my second step would come under step one. What is the best way to do this?
how to write a very refined selector
I am trying to write a selector that selects all <tr> that contain "<code>name</code>" Ive tried : $("tr:contains(<code>"+value+"</code>)"); It only returns only 1 <tr> when in fact there are multiple <tr> that contain these values.
get the count of results from a selector
how would you get the number results from the code below? $("tr:has(<td><code>"+value+"</code></td>)").each(function(index, element){});
How to trigger an automatically created button after page load?
Hi i wanted to make a script which always pushes a certain dynamic created button on IMDB. i'm speaking of the "add to XY list..." button which can be found under each movie page on imdb (for example: http://www.imdb.com/title/tt0106519/?ref_=hm_rec_tti). The button can be found in the dropdown list next to the button "+ Watchlist". (only of course one is logged in and has at least one additional list next to the default watchlist) So what i want is that when i open such a movie page it should automatically
Slider Lines up text before fading into next content.
How can I get my slider to only show one piece of content at time. It seems to line up my content and fade out to the next content. I don't want to see my content on my slider all bunched together.http://clarissagriffin.com/test1
How can I save a jpg image of a canvas on my server
Hi, Going on with canvas now I want to save my canvas that I've created on the server in an image. Here is the code that enables me to have the data of the canvas Does some one know how to convert this in a png or jpeg image and save it in a directory please? Thanks! var canvas = document.getElementById("myCanvas_OUT0"); var context = canvas.getContext("2d"); var pixout0 = context.getImageData(0, 0, 75, 100).data; David ( @webtecgeek www.thecacaocafe.com )
how to get the pixel data from a canvas filter it and create a 2 canvas.
Hello, My question is how can I get the values of the pixels in a canvas stored in a 1 dimension array. I have been able to know the values of the pixel of a photo and transform them in canvas. It seems stupid but I cannot find on the web how to get the data of a canvas. In the example here I load a first canvas from images=> OK Now I want to get the data from the first canvas to filter it and create a second canvas. Can some one help me please? <!DOCTYPE html> <html> <head> <title> EE Q_28383720
Jquery ajax and returned data interaction
Hi there, So.. I'm using $.(ajax) method, but when data (<div id="t1">text</div>) is returned jquery will not interact with it. for example, use click event when someone click on this div which returned using ajax. thanks.
There is any function to add a smooth effect to an expand search bar on click?
I'm trying to make an input search that expands when we click in the button class = "expand". I already have this working with this basic jQuery, but the effect is a bit bad, its not soft. I've been looking for information on the web to see if I can add an effect to soften the expansion of the input but can not find anything. Anybody out there know what function I can use jQuery for this? jQuery <script type="text/javascript"> $(function() { $('.expand').click(function() { $('#test').show(300);
sort
Hi, I have the table is displayed the results from the query. It worked fine the sort by asc or desc. Is there the way to find out which field is user is clicked on for sorting? My code below has 4 fields. I want to able to tell which field is user is clicking such as, Type or Number or Result....? Thanks <script type="text/javascript"> $(document).ready(function() { $("#thetable").tablesorter({ // sort on the first column and third column, order asc sortList: [[2,0]]
Upload Image and insert the name in Database
$files[] = $uploaddir .$file['name']; $photo=$_POST['photo']; $query = mysql_query("INSERT INTO mosque VALUES('', '$nom', '$long','$lat','$photo','$adresse','$ville','$pays')", $this->db); th name of photo has inserted ike this:C:fakepathChrysanthemum.jpg, i want to insert just the name of image
I want my <p> to disappear when double clicked.But I can't figure out what's going wrong here.
<title>click demo</title> <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <style> p{ color: red; margin: 5px; cursor: pointer; } p:hover { background: yellow; } </style> </head> <body> <div> <form> <input type="text" id="myText" value=""><br> </form> <input type="button" id="but" value="Add" /> </div> <script>
Delete records as per check boxes 'checked' works but cannot refresh the page at the end
Dear All I had written a jquery that will select multiple records and delete them The JQUERY Deletes the selected records (records whose check boxes are checked) But, refreshes the page after deleting each record which is I want to Refreshes the page only after deleting all 'selected' records ->at present refreshing the page after deleting each records I amusing following code to refreshing the page location.reload(); // refreshes the page If possible display the list of records deleted in
.val()
Maybe someone here can help me. I'm trying to use some jquery to do a work around for ckeditor/cf bind issues. my form: <cfinput name="validate" class="temp" type="text" bind="cfc:model.myfucntion({selectvalue})"> and I have a select with an onchange event executing my jQuery. in the jQuery function: If I do console.log($('.temp')); I get the object example: [input#validate.temp, prevObject: jQuery.fn.jQuery.init[1], context: document, selector: ".temp", constructor: function, init: function…] 0: input#validate.temp
jQuery UI accordion widget will not work with dynamically created HTML
Im trying to implement jQuery UI accordion in a "context sensitive" object properties palette. The content of the "accordion " <div> is dynamically created depending on the object selected. $("#accordion").append( "<h3><a href=\"#\">"+key+"</a></h3>" +"<div><p>" +" Attribute Information" +"</p></div>" ); Once this content is generated, the entire content is displayed but there is no accordion action. I can, however, use developer tools to go in and copy the HTML that was generated,
jQuery conflicts..
Hello, I am working to build wordpress theme from scratch, I installed Js script to my vertical Menu, and plugin to my slideshow, The two work correctly when I installed it without my style.css and my theme built.. But when I integrated it to my theme it does not work together!! :( I don't understand where is the problem? is it related to my style.css, php files or jQuery conflicts? could you help me please.. Sam
Add attribute not working
Hello everyone, I am having some trouble adding an attribute in jquery to a select many checkbox in primefaces. I done this function so far: $("div.ui-chkbox-box").live("click", function(){ $parent = jQuery( $(this).parents(".ui-selectcheckboxmenu-panel") ); var classes = $(this).attr("class"); if(/ui-state-active/i.test(classes)){ var temp = $parent.attr("id").replace(/\:/g,"\\\\:"); var compId = "#" + temp.replace("_panel", ""); $id
How to append content to draggable list?
Hello together, I am quite new to jquery. What I would like to realize is a simple, draggable content slider. When the last slide is reached, new slides shall be loaded from a server function. The first slides shall be removed so that always a constant number of slides is in the slider. The simpliest and best static slider which I found so far is this one: http://jsfiddle.net/M8ydk/1/ From my point of view, only the dynamic adding of the next slide and removing of the first slide is missing. I tried
Page controls moving after Toggle()
Hi All, I'm just starting to learn using jQuery with ASP.net MVC. I was exploring the Toggle() method to show/hide a div. I was able to implement the toggle feature, but when i toggle the div, controls on rest of the page also move after toggle. What if i just want to toggle the div without affecting rest of the controls on the page. I tried using ''display: none;" and "visibility:hidden" but did'nt get expected result It would be really helpful if you guys can jolt down some steps or redirect me
My navigation is not consistent in all browsers
Hi Everyone, I'm very new to jQuery. I have an issue with my navigation not showing up correctly in browsers, namely IE and on mobile devices. Here is the URL http://di-giovanna.com/ And I have my .css style sheet below. Thanks for your help in advance!! @charset "UTF-8"; /* CSS Document */ * { margin:0px; padding:0px; border:0px; } #slideshowContainer { width: 900px; height: 273px; } .slideshow { height: 273px; } .slideshow img { } #nav { list-style-type:none;
Trying to understand developer tools
I am in need of tools to be productive using jQuery and I am wondering if there is a "one size fits all" tool like Visual Studio does for ASP.NET. A few questions below...... Can you write jQuery and debug with the same IDE (Google Chrome, Sublime, BBEdit....etc) This maybe a Microsoft term but do any developer IDE's have intellisense or something similar Has anyone used Visual Studio to develop jQuery or is it better to use another tool I have read some stuff online like JSense https://jsense.codeplex.com/
cannot get country dropdownlist loaded using ajax and php
I CANNOT GET THE COUNTRIES LOADED INTO THE COUNTRY DROPDOWNLIST CAN SOMEBODY HELP ME <HTML> <HEAD> </HEAD> <STYLE> #SRCHORDERS{ position : absolute; top : 100px; left : 20px; width : 100px; } </STYLE> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <SCRIPT> $(Document).ready(function(){ var COUNTRYCOD = 0; $.ajax({ type : "POST", url : "http://localhost/AJAXPHPMYSQL/GETCOUNTRIES.PHP", success : function(COUNTRIES){
Help with image gallery counter
Hello, I was wondering if someone could help me with adding an image counter to this gallery. http://tympanus.net/Tutorials/ResponsiveImageGallery/ something like image 2 of 16 Thanks
show elements
<div class="toggler">teste</div> <div class="toggler2"><b>testes</div> </div> <div class="toggler">teste</div> <div class="toggler2"><b>testes</div> </div> <br> <script> $( document ).ready(function() { $("div.toggler").click(function() { $(this).closest('center').next('center').children('div').slideToggle('slow'); }); }); </script> but don't work!
JQuery Online Marketing Software
Hello. I am new to web programming but I want to create a jquery online web marketing program and was wondering how I can go about doing that. See The Details Below: 1. I want to create a web extraction tool that i can put on my hosting with host gator to use online. I want to have an admin page so that registered users can sign on and use the program through my website. 2. I am looking to get software from someone who already produced a software that can do this. I want to convert his software
Animated Canvas as a background image of a website
Hi, Since I sligthly improve my knowledge in canvas I was wondering if it is possible to define a background canvas in my <body> like we can do with back-ground image. The idea is to have an animated canvas that would run. Of course I prefer to test my ideas before begining to try to code. So firstly my question is does some one knows if it is possible and would have an example of coding,please. Great thanks. David David ( @webtecgeek www.thecacaocafe.com )
how to load canvas in jquery not from image but background-image?
Hi, So here is my problem: I want to load canvas from the background image of a div and not direct from an image and I fail. Does some one know how to do that? Here I give a link on a test page in my website in order you see the question better build canvas from image src or background-image you can see the first 10 images where it is OK (METHOD 1 classic canvas from img src) at the bottom you see the 4 sprites background-image I fail to transform in CANVAS I show the code I us'e for the first method
How to add two values using jQuery ?
can somebody help me in this , i want use two two text boxes . i will enter values in each. i will have a button control to add those values . when i click on add button the resultant value should be displayed in the third text box. Thanks in advance !
Next Page