Instead of fire my method after 3 second setTieout display it on load
< script type ="text/javascript"> $(document).ready( function () { window.setTimeout(Alert.render( 'Test' ), 3000); }); function CustomAlert() { this .render = function (dialog) { var winW = window.innerWidth; var winH = window.innerHeight; var dialogoverlay = document.getElementById( 'dialogoverlay' ); var dialogbox = document.getElementById( 'dialogbox' ); dialogoverlay.style.display = "block" ; dialogoverlay.style.height = winH + "px" ; dialogbox.style.left = (winW / 2) - (350 * .5) + "px" ; dialogbox.style.top
JQuery JSON Tumblr and Last.fm API--not appearing in correct order
I have a list of my recent Tumblr audio posts coming in through the Tumblr API and with each post, an artist summary from the Last.fm API is attached. I have the data coming in correctly, but the audio posts are not showing up in chronological order. Every time I refresh the page, they appear in random order. I would like to have the most recent audio post appear at the top. Here is my code: $(document).ready(function() { var user = "nycxnc"; var key = "###"; var type = "audio"; var limit = "5";
Can't get ID of an object
Hello, I really don't know how to get the ID of an attribute of a child of an object. Please can someone help me out? Attached, you can find the console log: I have an array myOrders, with a child and many other attributes. Many thanks!
Please help, tabs display in sharepoint 2013 using jQuery
Hello SharePoint 2013 users, I am having trouble in making SharePoint 2013 make tabs in the item level display of a list. Could someone help? What I am trying to do is edit a list of items to be presented in a tab format, with each tab containing 6 items that dynamically update. I have tied different things like the jQuery tabs function but it only works on one level of display and does not seem to allow dynamic items to be displayed. I have found someone that made something that is close to what
Infinite Loop matter !
Hello I've got some matters with my infinite loop function on a website I've built. Since some days, the loop doesn't loop at all. It stays fixed on the first image. here is the url to the website. laurevangaver.fr I am pretty rubbish concerning the html code , so if you can help me, that would be great . Especially since it's pretty urgent, and my customer Needs to show her work fast enough! And here is my code for this page : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
how to read the value of a hidden fileds ?
I used lot of data attributes in my html code, but when deployed I was surprised Apache is not supporting data attributes, so I am trying to convert data attributes that have array as value to hidden text field. here is a fiddle that show the html code : http://jsfiddle.net/mlotfi/dtmzaevb/ Can you please show me how to read the value of those hidden fileds in jquery ? thanks
Validate a field (input box) and how to show a window.
hi friends, i think this question is easy i explain my process: 1) i have 3 fields, and 2 buttons (SAVE and RESET) 1) Capture NAME 2) Capture TITLE 3) Capture AGE. Initially the 3 field have a empty value. I start capture the NAME (if here the user click on SAVE button) i need show a message, saying: "Need Capture AGE" and focus to capture AGE field. i know how do it but after subbmiting the data (with php, check and do nothing)... but i think exist other wa. Note i searched on the forum
change the closest class to my clicked button
Hi all I have a class applied to many different elements throughout my site. On one page I have a button which when clicked needs to update one instance of this class (the closest instance to the button) in the DOM but I cannot get this to work. A loose example of my HTML is below: <p class="thisone">text here</p> <p>blah blah</p> <p class="thisone">other text here</p> <input type="button" id="mybtn1"> What I need to do is ensure that when the #mybtn1 button is clicked, only the closest instance
Display JSON data
i WANT TO DISPLAY {"stnm": {"stop_nm":"AZ","bustime":"06:31 AM"}} {"stnm":{"stop_nm":"A","bustime":"06:35 AM"}} {"stnm":{"stop_nm":"DA","bustime":"06:40 AM"}} {"stnm":{"stop_nm":"SI","bustime":"06:50 AM"}} {"stnm":{"stop_nm":"DA","bustime":"06:55 AM"}} {"stnm":{"stop_nm":"DEH","bustime":"07:20 AM"}} {"stnm":{"stop_nm":"SIKA","bustime":"08:02 AM"}} {"stnm":{"stop_nm":"SIKAN","bustime":"08:02 AM"}} HOW TO DISPLAY THIS DATA INTO JQUERY TABLE
simplest way to create a register page for new user
simplest way to create a register page for new user
To add and to remove classes with delay
Hello: I need to do a function JQuery that, to every image he adds a class css and after a delay she is removed and then it does the same thing with the following image. In my page html have: <h2>Seleccione una tematica</h2> <div id="container"> <p:dataGrid value="#{backingTematicas.tematicas}" var="tematica" columns="4"> <h:form enctype="multipart/form-data"> <div id="img"> <a href="#"> <h:graphicImage class="no-selected" value="imagen/#{tematica.img_path}"/></a>
Click event not responding
Good morning all; I am experiencing an issue with a button and the JQuery click event handler. The handler is not firing. This is the button. < input type ="button" id ="ChangeSubCLIN" value ="OK"/> Here was the handler as originally configured. $("#ChangeSubCLIN").click(function (e) { debugger var CtrSubLineNumber = $.trim($("#tdEditSubLineNum").text()) + $.trim($('#PRSubLineNumberCharPart').val()); var CtrSLQty = $("input[id*='CtrSubLine_SubCLINQty']").val();
editing html with jQuery / selecting a value and then putting it back with out and id or class
Hello everyone, I am having a problem with extracting the information with in a <tb> which is located in a auto-generated html page. Please see the picture below. Bellow are thinks that i have tried: $(document).ready(function(){ var toAdd = $("#WebPartWPQ2).parent().parent('tr:eq(2)').parent().parent().parent().parent()").closest('tr').find('td:eq(1)').text(); }); alert(toAdd); I cannot seem to get the content of "test222" to appear. Could someone please advise of how I can make this work using
Issue with on change event
Hi I'm populating a text field dynamically with Postcode Anywhere API. The alert below works only when I manually edit the text field #input_42 and not when the field gets dynamically populated. Can anyone tell me what the issue is? Thanks jQuery('#input_42').on('change', function() { alert(jQuery('#input_42').val()); });
Open popup window and close with timer
Hi, I'm using a popup frame to display a video. It works but I want it to automatically close once the video is done playing (which is 23sec). What am I doing wrong? setTimeout(function() { $('#companyVideo').trigger('click'); window.parent.$('#companyVideo').dialog('close'), 23000 } );
How to get value from the JSON response
Hi, I get the following response from the server: {"aster":"3","daffodil":"4","rose":"3","totalItems":10,"totalPrice":"31.90"} and, I want to put it in the table that will look like this: The problem is that I do not know how to get values (for the "Quantity" column). This is my code: function processServerResponse(data) { if (data.products.length > 0) { $("#orderForm").hide(); $("#summaryForm").show(); var html = ''; $.each(data.products, function(key, value)
how to make tab to stay in the current tab after submitting the form
I have 3 submit forms in tabs.after submitting the form it displays the msg registration succesfull.but it goes to home page so only after clicking the particular tab im can see the msg.i want to make the tab to stay in the current tab after submitting the form.plz help ASAP!! <div class="tabs"> <form id="target"> <ul class="tab-links"> <li ><a href="#tab1" id="tabs-A" >Incident Report</a></li> <li><a href="#tab2" id="tabs-B">Death Report</a></li>
I am looking for a programmer
Hello all: I am looking for a programmer for a special project. We need a diagram of the brain - in grey scale - which we have now. Then, we have mapped out regions of the brain that we want to glow from zero color to blue. Or we want to go from zero to yellow and also zero to orange. Each brain region - probably 25 to 35 regions would have the ability to glow in any of the three colors. Teaching brain regions by way of visual colors - blue is cool or OFF, etc. I visualize my browser page with
Simple background color switcher problem
I have created a simple background color switcher and it switches color only on the first click, but doesn't remove it on the second. Here's an excerpt of my HTML and jQuery in its entirety below it: <body> <button> Change </button> </body> $(document).ready(function(){ if(!$('body').hasClass('bg')){ $('button').click(function(event){ $('body').addClass('bg'); }); } else{ $('button').click(function(event){ $('body').removeClass(); }); } }); Could you please help me resolve the issue and point out
$ (Jquery) undefined
Hi, I read a couple of posts to solve the $ undefined error, replacing the <src> link to include the jquery file. First used the local: <script type="text/javascript" src="1.7.2.jquery.min.js"></script> Then used the external: <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script> Get undefined on line 8: $ $.getJSON("/data2.json", function(data) I would appreciate any assistance.. <!DOCTYPE html> <html> <head> <title>Test - Reading data in JSON format</title>
How to operate on the result set of .find?
The following code does not work, but I cannot figure out why. Nothing is even saved to console, soI do not know how to debug it. $('li').find('#important_item').each(function() { $(this).css({ 'border': '1px solid blue' }); console.log(this); console.log($(this)); }); Secondly, Do I have to use .each to operate the result of .find? Or is there a way to include an anonymous function directly in .find? (example: $('li').find('#important_list_item_1', function() { // function
This function is not working with jquery 1.11.1.js
$(function () { $("[id*=treeviwExample] input[type=checkbox]").bind("click", function (e) { var table = $(this).closest("table"); if (table.next().length > 0 && table.next()[0].tagName == "DIV") { //Is Parent CheckBox var childDiv = table.next(); var isChecked = $(this).is(":checked"); $("input[type=checkbox]", childDiv).each(function () { if (isChecked) {
Page content disappears when .slideToggle has been used to close div.
Hey jQuery forums, I had a problem what occurs only on Android phones using the Chrome browser. Info: jQuery version: 2.1.3. I have a 2 divs that are below eachother you click the top one and the lower one closes: <div id='homeExtenter'> <div class='menuItem'> <div class="menuHeader">Menu Header</div> <div class='menuItems'> <ul> <a><li>Item 1</li></a> <a><li>Item 2</li></a>
jQuery.ajax() vs. loadXML
Hi, I have the following code: myGrid.loadXML (myUrl, function () { console.log (myGrid.getRowsNum ()); }); and it is working well (I will see the number of rows of the grid on the console). But I replaced the following code with this: $.ajax({ type: "POST", url: myUrl, dataType: "text", success: function(result) { myGrid.parse(result); console.log (myGrid.getRowsNum ()); } }); and the result is 0. Why? Function parse() should be synchronous,
Slow Loading Slider
Hello everyone. I'm hoping someone can help...i've got a slider on my front page here: celtics247.com The response is really slow, not sure if there is something I can do to improve the performance time. Thanks!
Pass datepicker value to PHP & MySQL
Hi, I have the attached new_leave.php file which has dateFrom and dateTo datepickers. When submitting the form I don't get the correct MySQL format therefore it's throwing an error. The value I get is something like this: 1423900800 that's when I try: echo $timestamp = strtotime($_POST['dateFrom']); can you help please...
NS_ERROR_NOT_AVAILABLE: prompt aborted by user, nsPrompter.js:426
Im getting this error in Firefox i googled it but i didnt get exact solution. I think the error is in this piece of code CODE:- $(window).load(function(){ if(localStorage.getItem('verify')=='\1'){ if(localStorage.getItem('claim') == '\0'){ if(localStorage.getItem('delete') == '\0'){ $.post("sample.php",{RegID:localStorage.getItem('Id'),Token:localStorage.getItem('token')},function(data){ $('.name>p').html(data.Name); $('.rate_div>p').html(data.Rate); $('.cover').css('background-image', 'url('+ data.Pic+')');
Looking for less recursive way to change a channel name across multiple buttons
Wordpress site and running at clanaod.tv The script below is changing my iframe srcs on click of any of the buttons , what I'm trying to do is create an automated way to quickly add new channels through a list rather than individual lines In other words I'm trying to find a way in which I can add ClanAODTV through a submission form to a list and it will create and autofill the url Variables ClanAODTV Silencer77 NewColossus <a href="javascript:twoFrameChange('http://twitch.tv/ variable/embed','http://twitch.tv/chat/embed?channel=
Grid Accordion Text
Is there anything out there that is an accordion but when you click it, it shows more than one sub level? For example:
Workaround for break in IE10-11 cross domain Patch support
jQuery versions 1.6.0 - 1.10.2 provided support for making cross domain Patch requests in IE10 and IE11 using the jQuery.ajax() method (assuming all client and server settings are configured correctly for CORS). That support broke beginning with jQuery 1.11.1-rc1. A properly configured ajax request in IE10/11 now fails with "Error: Could not complete the operation due to error 8070000c." Stepping through the relevant jQuery code shows the underlying error being thrown as -2146828218, "Permission
Colon in Ajax jQuery data
The code below uses jQuery to gather data from a form and sends it to a PHP script. I have noticed that if one of the variables (variable1, variable2, variable3) contain the ":" (colon) character then this causes problems with the jQuery script and the PHP script won't get the correct input. Is this a known problem? How do I solve this? Are there more characters besides ":" that causes problems? var variable1 = $('#variable1').val(); var variable2 = $('#variable2').val(); var variable3 = $('#variable3').val();
Change content from ABC to XYZ inside a span
I have this : <span class="additional-background"><span class="menu-item-text">ABC</span><span class="ms-hidden">Currently selected</span></span> inside some div structure. Can i change the content from ABC to XYZ using JQuery. Thanks
Dynamically created checkbox value serialization
I have a form where rows are added to a table when they are chosen out of another table. I append like so var html ='<tr><td><input type="checkbox" value="false"><td><tr>' That is short form, I also added a hidden input in there because I am using MVC. So now the checkbox is added to the form unchecked, which is the intent. If I jquery.serialize the form, the checkbox value is not shown, only hidden input shows as false. So far so good... When I check the checkbox, 2 values are serialized, false
Infinite list: after “Go back” to the list, the new elements are not there any more. How to restore them?
Im using AJAX to make an infinite list of elements (products). When I go to another page far from the list, and then "Go back" using the browser to the list page, the products added while scrolling down are not anymore there.. My question: after "Go back", how to show the products again (even those added while scrolling down)? I thought in these two options: Option 1 : restore them in some way since they were already shown in the client. In other words, they already are in the user's computer. is
what to do if data-attribute is not working ?
Hi, it looks like our Apache server is not configured to work with html5, I talk to people in charge of the configuration but did not get any help, maybe they don't know how to do that setup. My question here is : when my html page load, couple data attributes got populated from the server side, but let say we have a static html code that has : <tr id="24" data-one="[string1,string2,..stringn]" data-two="[otherstring1,otherstring7,...,otherstringm]" > </tr> what can you advise me to use instead of
Odd behaviour when I bind an event again
I hope your 2015 it's being awesome and thank you from beforehand for taking a minute of your time to help me, first of all, I'm a noobie who's been learning by its own...I stumbled upon with the 'unbind' and 'bind' events and that's giving me troubles, please take a peek to the next code: http://jsfiddle.net/nero_noob/ktf1v8k0/ click at 'stuff1' or in 'stuff2' and you'll see they both have a 'toggle' attached to them, no bid deal...when I click in the button 'unbind' the effect dissapears as I
copy to clipbord
Hi, I found this copy to clipboard in this page : http://www.quackit.com/html_5/tags/html_video_tag.cfm under the section that says : Web Server Support for MIME Type I tried to duplicate it i a jsfiddle, but it does not work, here is my fiddle : http://jsfiddle.net/mlotfi/y12d2915/ Thanks
Attribute Equals Selector [name="value"] and periods.
I recently upgraded jquery from Jquery.ui.1.7.2.js, jquery1.3.2.js to jquery-ui-1.9.2.js jquery-1.8.3.js. We use MVC and have a lot of name attributes with period in them so they get put into our models. Code that used to work no longer works because jquery no longer allowed periods in name value selectors. On the following page http://api.jquery.com/attribute-equals-selector/ it says value: An attribute value. Can be either an unquoted single word or a quoted string. So can someone specifically
Maintain a session from json data
I need a session to create in window load function and can use that session to pass as a parameter to login.php file or is there any alternate maintain a session and use it as globally? $(document).ready(function(){ $('#login_btn').click(function(){ var rest_username = $('#email_login').val(); var rest_password = $('#pwd_login').val(); $.post('Login.php',{Email:rest_username, Password:rest_password, BrowserName:browserName, OpertingSystem:OSName},function(data){ if(data.value){
how to now what event is blocking another event? (phreeze example)
Hello, I'm trying to build a site with phreeze that uses jquery and bootstrap. on generated lists creates something like this: http://phreeze.com/cargo/services With depends a lot on this http://phreeze.com/cargo/scripts/app/services.js I edited the html of the listview adding a column with an image. Add a click event on that image, but the row-click event is "blocking it"... If I remove the code from services.js, particulary: $('table.collection tbody tr').click(function(e) {
e.preventDefault();
var
Next Page