How can i call https request using $.ajax ?
Hi guys Suppose Server url is : https://example.com/employee and it returns json data I want to call this url using Jquery in iphone I wrote this code : $.ajax { type: "POST", contentType: "application/json; charset=utf-8", url: "https://example.com/employee", data: "{}", dataType: "json" success: function(res) { } }); Is this the right way to call this https request or I need to do some other authentication also Currently it does not work in iphone It return's json data in firefox,chorme,IE ,safari
Updating dynamicly alterd class structures with dynamic content(help)
Hi i'm using http://github.com/soundcloud/soundcloud-custom-player to load and preview music on my page. It all works really well, when you write pure static html code with just <div class="sc-player"> <a href="http://soundcloud.com/matas/on-the-bridge">Oxxo</a> </div>And it will automaticly transform that url into a working custom-player. Done with the soundcloud api. But when i use $.getJSON and dynamicly get down a list of urls that
delegate submit not working
Any idea why this submit event is not executing? It works fine if i change it to a "click" event and serialize the submit buttons parent form but i'd like to know why wont this work? [code] $(dialog).delegate("form#stayplanselect", "submit", function(event) { event.preventDefault(); $.post("/admin/viewer/rates", $(this).serialize(), processResponse); }); [/code] Thanks.
Write jQuery Books - Packt Publishing
Hi All, I represent Packt Publishing, the publisher of computer related books. Packt recently made its list of "hot topics" public which includes jQuery. "Hot topics" is a list of topics on which Packt is interested in publishing some books. So, any proposals sent to us pertaining to this list will catch our immediate attention. If you love jQuery and fancy writing a book, send your book ideas to us. Even if you dont have a book idea and are simply interested in writing a jQuery book, we are
Creating an Event calendar using PHP and jQuery
Hello all, JQuery newbie here. I think the problem i've got may be blindingly simple really, but it's got me stumped. i've downloaded an events calendar from here http://iambari.com/2009/05/05/create-an-event-calendar-using-php-and-jquery/ and its ideal for my purposes. I have everything working fine. Apart from the current month does not display as the title, I just get the calendar, with all the days of the week falling in the right place but nothing to tell you what month it is. The demo
Detecting when the li element class change
Hi there, I am posting in order to find a solution to this but i can't find anything, I am trying to change to change the background of a li element when its own class is changing i tried : $("ul#slide-nav li").each(function() { if ( $(this).hasClass("selected") ){ $(this).css("background-color","black"); }else{ $(this).css("background-color","gray"); } }); This seems to be working i think.,
how to add special symbol (average) to textfield
hi... ich got a textarea and want to add a special symbol to it like average. would be awesome if there were a button next to the textfield where a dialog pops up. via click on the specific symbol it should be added at the promt in the textarea box. maybe something like that smiley input in this wysiwyg-editor. should be as easy for the user as possible. any ideas? does anybody know a plugin for that problem? i googled a lot and didn't find anything suitable. thanks in advance!
My script needs a fade rotator!
Why don't they communicate with each other. I saw this (www.3fm.nl) which has a nice slider and I want to create a similar one. I got the hover-part. Which seems to work fine. However I need the fading slideshow when not hovering. Who can help me with my final js? html <div id="slideshow"> <div class="show_pictures_container"> <ul class="show_pictures"> <li class="article_row cols1 clearfix"> <div class="article_column column1"> <div class="contentpaneopen">
Simple code, tons of probems (ajax, order of operations, etc.)
I'm trying to update text based on ajax replies and things aren't going quite as planned. For the time being, I've commented out the code that references other files. Why when clicking on an Issue would the "failing" alert pop up before anything else? <?php //require_once './config.php'; //require_once './like.class.php'; session_start(); $_SESSION['User_ID'] = '5'; ?> <html> <head> <title>Like Test Page</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
.attr("onclick", "javascript:addItem(this);") problem in IE7
Hello Folks, Adding javascript attribute to an element using .attr("onclick","javascript:addItem("hello",this);") does not work in IE7. Hence I switched to .bind, like this .bind('click', addItem) , but how should i pass those two arguments ("hello" & "this" ) to addItem function. Kindly help me. Thanks in advance.
attribute like (*=) selector question
sorry if this has been asked or report anywhere before, if so please directed me to the post, as i couldnt find it myself i have a selector like $("#tabId [name*=\\[-1\\]]") and i am able to find elements under tabId with name having "[-1]" in it however when i do var $t = $("#tabID") $t.find("[name*=\\[-1\\]]") i cannot find anything can someone tell me why? thanks i created a jsbin sample http://jsbin.com/akimo3/
.load() working on all browsers except chrome.
I am new to jQuery and would be glad if someone help me out with this. I want to insert content from external html files based on links clicked. I am using the following code <script language="JavaScript"> function content(n){ $('#menu-content').html('<p><img src="images/ajax-loader.gif" width="16" height="16" /></p>'); setTimeout(function(){go(n);}, 500); } function go(i){ if (i==1) { $('#menu-content').load('test.html');
Selecting multiple tags, but differentiating between each
Hey everyone, I couldn't find this anywhere so I decided to ask it. If I use $('<a>') for example, how can I get a specific reference to each? Does it return an array for example? So if I had 3 links on my page, I want to get the info for link 1, 2, and 3 individually. Is this at all possible without specifying unique IDs? like $('<a>').ref1.attr("src"); $('<a>').ref2.attr("src"); etc... (obviously I made up .ref#) but is there anything similar to this? Thanks!
[MOVED] Form submission jQuery
Trying to do a form then when the users clicks submit that it will send an email. Everything works except it never sends the email. html <div id="contactForm"> <form action="" method="post" name="emailForm"> <table> <tr> <td>Name: </td> <td><input id="username" type="text" /></td> </tr> <tr> <td>Your Email: </td> <td><input id="emailaddress" type="text" /></td> </tr> <td>How can we help?: </td> <td><textarea rows="4" cols="20" id="message"></textarea></td> </tr> <td><input type="button" value="Submit"
css has disappeared
hello experts, i'm adding a div to the dom like this $('#div_on_page').html( "<div id='new_content'></div>"); i also tried this which has the same results $('#div_on_page')[0].innerHTML = "<div id='new_content'></div>"; the problem i'm having is that the css formatting is lost within the new_content div. anyone know how to retain it? thanks percy
Complete beginner to jQuery! Help! Help! Help!
I have been trying to take one small step at a time in learning jQuery... The first program I wrote is pasted below: The problem I am facing is when I run the applciation and click the button I have an error dialog pop up saying --> "Microsoft JScript runtime error: Object doesn't support this property or method" and pointing to this line --> $("div").addclass('color'); I have no clue how to go about it.. Please Help!!! <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
tell if a list-item is in the visible portion of a ul
Hi, I am trying to figure out a way to tell if in a situation like <ul id="ul1" style="overflow: hidden;width: 200px;"> <li style="float:left">one</li> <li style="float:left">two</li> <li style="float:left">three</li> <li style="float:left">four<li> </ul> so it looks like one two three four if I use the left css property of each li to move them left or right, is there a way to tell whether a specific li is visible in the ul or if it is out of its visible area?
Offset is returning null, why?
In my actual web page offset() was returning values that were much too high. Yet when I tried to recreate a simple example offset() now returns null. Below is the code and markup. Any ideas. Thanks, Jason http://jsbin.com/udowu <style> .header{ height: 65px; background-color: #3A4a5d; width: 100%; margin-bottom: 10px; } .menu{ background-color:#F6F6F6; float: left; height: 400px; padding: 5px; position: absolute; width: 200px; } .content{
fadeTo, Ajax:post, fadeTo in a controlled order after each completes...
I have a slide show I am trying to work with where I grab some html from the response on the ajax - what I want to do is "dim" the container via the the fadeTo once that fade happens it does th post for the html, dumps the response into the container then fades in - whats happening is the page dims, then fadesIn to opacity 1 then the page jumps and shows the new content…Does this make sense? I want to fadeTo - Load the new html from ajax and then fade it back to normal. Thanks for looking. $(#someID).fadeTo('slow',
Can you animate CSS changes, like text growing in size, using JQuery?
Hi all So, I have a hover state on a list item that makes the text enlarge and a swapping of background images, etc. I've already built it all with CSS, but I wanted to make the change animate. Is it possible to just animate the CSS changes with JQuery, by doing it with a class or something, rather than having to write all the changes in JQuery? Here is what I have, which doesn't animate: $("#archive ul#archiveList li").hover( function(){ $(this).animate().addClass('hover');
Need help optimizing a filter that's powered by jquery...
I have a page with a very large table. On this page is a text box that users can type in letters or words to filter the table. If they type 'abo' for example, only rows that contain 'abo' will remain visible, all other rows will be hidden. This is done by adding a class "visible" to all tr elements, and removing the "visible" class from elements that do not contain what the user entered. This works great for small tables, but when my tables get to be 1,000 rows and up, it becomes very slow. Any help
checkbox rules overlapping
I have 2 checkbox rules that are overlapping. This one runs first $("#BMFNP").change(function() { if($(this).is(":checked") && $("#INTEF").is(":not(:checked)")) { $("#INTEF").attr("checked", true); alert("foo"); } }); This one runs second: $("#BMFNP").change(function() { if($(this).is(":checked") && $("#INTEF").is(":checked")) { alert("bar"); } }); So basically the first one runs if BMFNP is checked, and INTEF isn't it
Javascript/Jquery Selecting a value from a dropdown should enable value for the other dropdown based on selection
Any idea on how to get this done... I have two text fields one is TECH field and another is JOB NUMBER... If I type a number in the tech field and If I select a number from the autopopulated/autosuggested list of tech number(which is queried from the database) it should display a dropdown list of JOBNUMBERS associated to that particular TECH number..... This is the code that I have to fetch the and the tech number will be the autosuggest field for which I have used JQUERY..... <script type="text/javascript"
why are my event handlers firing more than once after ajax?
i'll start off by saying i'm a novice developer. i'm building an mvc application and recently started using the jquery hotness. i've set up a right hand nav and bound click events for collapsible panes. inside one of those divs (action pane) i've bound click events which will open a modal dialog with a form. the form is submitted with $.post(). then i've used $.get() to refresh several divs with the new content. once that happens, all of my links begin to fire twice (collapsible panes and the
trigger click event on select
Hi everyone. I have been trying to develop a simple method of styling the button on select dropdowns. Basically just positioning a span of the button on a select box that is styled as required. That is trivial... What I have so far failed to achieve is to get the select box to show its options when clicking this span - just want to have the select box drop down the options as it normally would. tried .trigger('click') and .trigger('mousedown') but to no avail... Here is what I have: $(document).ready(function(){
using variables inside selectors
Hi there, is possible to do some math in this type of selector: $( ' li:eq (0) ' ) like this $( ' li:eq (some variable + 1 ' ) ?? thank you!
Searching Popup Modul (Mouseover Picture)
Hey, I am searching a script, what opens a popup when you drive over the picture (mouseover). Like this here: http://www.myvideo.de/Filme Anybody an idea? Thanks! Greets Stefan
.live() help please
Morning, I am relatively new to jQuery and having slight trouble getting my head round this: Currently I have the top half of this function working, as the cells are not rendered initially and once rendered the above will add the class highlight when hovered, but it doesn't remove it on hover out. $("td.ms-vb2").live('hover',function(){ $(this).parent().fadeIn('slow').addClass('highlight'); }, function(){ $(this).parent().removeClass('highlight'); }); Thanks in Advance
jQuery animate on window scroll: moving more object in parallel
Hi all, I'm trying to move 4 objects of the DOM when a user scrolls the page. you can check the page i'm talking about at this address: http://www.tessuti-arredo.it/new/chi_siamo/rassegna/ as the user scrolls - i'm using $(window).scroll(function() - i check if the window.scrollTop is more than 10 pixels to move some objects. This seems to work fine. but on the ELSE statement (i mean when scrollTop is minor than 10 pixels) - and theese objects should move back to the original position - i have a
Finding out which element exactly was clicked.
Hello everybody I am working on a little project with fullcalendar but while writing some callback functions stumbled upon an issue: Fullcalendar generates html that looks like this: <a><span></span><span></span><span></span></a>. Now there is an eventClick callback that is fired when clicking on that <a> element. However, in that callback I would like to know which <span> element was clicked. Does anybody know how I would do this? Thanks in advance!
Datepicker: Any way to disable the current day if today is Monday?
Man, my employer's client is getting picky! I put together this great jQuery datepicker (with the helpful assistance from some of you, here) with this code: $(function() { $('#dateWeekly').datepicker({ showOn: 'both', buttonImage: 'childtime/images/calendar.gif', buttonImageOnly: true, buttonText: 'Show Calendar', numberOfMonths: 3, showButtonPanel: true, minDate: -0, maxDate: '+12M', beforeShowDay:
Inserting prompt into cookie
I am pretty new at jquery as well as javascript in general.. I am having a hard time figuring out how to prompt a user then save that prompt into a cookie.. I am wanting to make a option on my forum to have someone open a prompt enter an image url then save that url into a cookie as well as writing their response into a img tag to make it a background.. I already have a script to save backgrounds images but was wanting an option to allow my users to pick there own favorite image.. Dont know if this
Fade... then delete an element?
I have the following code: $('#success').fadeOut(2000);that obviously fades, it but I also want to delete this element afterwards. However this doesn't work: $('#success').fadeOut(2000).remove();No matter what I do, it either does nothing or deletes the element without first fading. What do I have to do?
Adding input's value to an xml string
First off, this is not my design, working with a WCF service that is a little strange. I have a lot of checkboxes/input's and when they are clicked/filled out I need to add that value to the <COMMETNS> section of the xml string, which is the hidden input's value. Is this close to the right way? Again the xml string is the hidden input #AGREEMENTS value <input type="hidden" id="AGREEMENTS" name="AGREEMENTS" value="<AGREEMENTS><AGREEMENT><CODE>XNNonproStatus</CODE><VERSION>KV000001</VERSION><DATETIME><?php
Checked elements creating xml string help
With some help earlier, I was able to make this work when each ID only had one parameter to add to an xml string. Now I'm trying to do it again with 4 parameters to add, without hardcoding each one. Here is the expected format of the XML <AGREEMENTS> <AGREEMENT> //Code will be the checkboxes ID <CODE>SUBA</CODE> //I have the versions, but not sure how to add them, possibly this.name? <VERSION>2.0</VERSION>
dynamic jQuery with PHP
Hi, I am using the following code: <script src="js/jquery.tools.min.js"></script> <SCRIPT type="text/javascript"> function geturl(addr) { var r = $.ajax({ type: 'GET', url: addr, async: false }).responseText; return r; } function changediv(url) { $('#PrintContent').html(geturl(url)); } </script> Note the url in the change div functions. My PHP outputs the following: <td><a href="#" onClick=changediv("printresultpage.php?id=5");"> <img src='http://www.dieseladagency.com/dieselCMS/uploads/smad2.jpg'></a></td>
Dynamically writing the page makes jQuery not to work?
I created a .NET web page (.aspx) with few lines of jQuery to display and hide things onmouseover and onmouseout. It was working. My design requires that I get user role information from the database, then depending on the role - I display certain menu options. Therefore, I tried to Response.Write the exact same page (body) contents in the Page Load. Now, my jQuery is not working at all. Any idea how I can make it work? Thanks.
problem using .load
Hi, I'm populating a select pulldown based on the value of a previous option on a pulldown When I run it on the firebug command line it works fine, but when it is run in the source it does not populate the html with option's for the pulldown. am I missing somthing here? $('#regions').change(function() { town=$('#regions :selected').text().trim(); $('#town').removeAttr('disabled').after().load('rtnregions.asp?region='+town; });
jQuery Slider - how do I embed into my hompage html code?
Hi all, I have created my own jQuery slider from this tutorial: http://www.dreamcss.com/2009/04/create-beautiful-jquery-sliders.html I have all the relevent coded files and images in one root directory and the slider works when I test the index file. However I need to know how to include my slider into my homepage. I have tried pastingf the html and script codes into the body of the homepage and linking to the jquery and .js file in the head tag and making sure everything is linked up properly,
having trouble mixing hover add remove class functions with an "active" state for links
<script type="text/javascript"> $(document).ready(function(){ var classes; $('span a').hover(function(e){ // hover on classes = $(this).attr('class').split(" "); for(var i in classes){ $('a.' + classes[i]).addClass('sibling').show('slow'); } $(this).addClass('selected'); $('a:not(.selected, .sibling)').addClass('fade').show('slow'); }, function(e){ $('a').removeClass('selected sibling fade').show('slow'); }); }); </script> in the aforementioned code I am trying to associate
Next Page