jquery

javascript getting client ip

Hi I found how to get client ip by answer here: http://stackoverflow.com/questions/102605/can-i-lookup-the-ip-address-of-a-hostname-from-javascript But I don't understand how to use it. This is what I have: var user; if ($('#user-id').length) { user = $('#user-id').text(); } else { http://jsonip.appspot.com/?callback=getip ...

Something awry about my .show() and .hide() action conditional

OK, so I'm working on this unique background project here, and I have a problem: I'm trying to hide certain parts of my background on page load, which works great. However, my other lines of code I provide below try to make some of them reappear when the link has a certain class, however, even though I know that the link has that class...

Manage Theme Editing using PHP & jQuery

I have a theme in which there are numerous options, like:- Setting Theme Type among many available Setting Body Background Color & Image Setting Header & Footer Images Setting General Font Face, Size & Color Setting Text Area Background Color, and Font Face & Font Color Setting Form Area Background Color & Rounder Corners option Settin...

hide/show jquery not working in IE

I have a select menu that shows/hides the "livetransopts" div when an option is clicked. Works fine in Firefox, Chrome etc but not in IE can anyone help me???? <select> <option class="hidelivetrans" value="No">No - Don't transfer the call</option> <option class="showlivetrans" value="Yes">Yes - Transfer the call</o...

Jquery - Select the second Style-Tag

Hi, how can i select the second Tag? $("head > style:nth-child(2)").html(); Thanks in advance. Peter ...

Jquery - How to check if classname exists

Hi, i want to check the style Tag if a classname exist or not. if ($("head > style:eq(2)").hasClass('className')) { alert('yes'); } Thanks in advance Peter ...

how to implement a search in codeigniter and jquery ajax

Hi guys, I'm trying to implement a search for my project , but i can't figure it out how to use ajax and get data to the view, can some one help me with this? (this is my first project using codeignter and jquery) regards, Rangana ...

How do I prevent CSS interference in an injected piece of HTML?

I'm currently developing a Safari extension that uses an injected script to further inject some HTML into the current webpage, as well as injecting some other scripts to make it work. This is all working fine, but the issue is that the HTML that is injected gets affected by CSS stylesheets that the webpage has already imported. For examp...

run lightbox in jQuery by click on a button

for running the lightbox in jquery you must click on one image('a' link) of the gallery then immediately lightbox runs.... $('#gallery a').lightBox(); but i am going to use the lightbox as a zoom, that means i have a button 'ZOOM', by clicking this buttom i am going to open my gallery... i don't know how i can do this... ...

Onclick form submit using mootools

Hello, I am using JQuery onclick submit event like this <script type="text/javascript"> $(function(){ $('#button').click(function(){ $('#form').submit(); return false; }); }); </script> I want to do it with mootools. Thanks ...

MVC Post Json Error

Hi, I'm try to issue a post to a MVC action and displaying the resulting JSON on the web page. The action receives the post command but the result is showing up on a new page, instead of the same page. For example, it'll ask if I want to download or open the file. PS. I'm using jQuery validate as well. my jquery: submitHandler: functio...

Add href to links dynamically

I have a series of horizontal div boxes that I need to add the relevant href to link to the next one with anchorlinks. As they are produced dynamically I need to add the href with JavaScript. The desired effect will be: <div id="post1"> <a class="next-video" href="#post2">NextVideo</a> </div> <div id="post2"> <a class="next-video" hre...

iphone web apps: performance hotspots? caching? javascript bottlenecks?

I'm starting to make an iphone app with jqtouch - so i'm keen to hear some best practises. I'm developing for iphones users on a UK 3G connection. Any particular things that cause script blocking? What are the main performance hotspots? Whats the deal with browser caching? If the iphone doesn't cache should i include my scripts and st...

jQuery change input type

Trying to change input type attribute from password to text. $('.form').find('input:password').attr({type:"text"}); Why this doesn't work? ...

How do I grab the last value in a string

I know I can parse out the int by doing parseInt($('#count_of_stations').html()) if the value is like this "2stations" that will return 2 but now I need to get the integers out in this format one1 two2 three3 four4 five5 How do i get just the number out ...

How to know which jQuery button was clicked in list context

I have a list of stories on a page and each has several jQuery buttons for different actions. When the button is clicked, I need to know what story it is was clicked for. Currently I have each story wrapped in a div with an id of format story_<story_id> and then in the handler I traverse up and parse out the id. <div id="story_1" cl...

Selecting an option by its text

Hi, I'm developing a web page using django and I want to add some javascript to a form using jQuery. Basically I want to select an option in a form depending on an another selection. I need to use option's text and not option's values because option's values are generated dynamically by django. An extract of my code: javascript $...

jQuery Uploadify Advanced File Validation Question

After long time of searching the best upload technique I've decided to go with jQuery Uploadify. I got no problem implementing it into existing code, excluding one thing. I created strict upload validation rules. The main problem is that onAllComplete() function returns success message. In my validation file I tried to use echo 'errror...

Background image reflection

So I have a background image(background:url(my_image.jpg) no-repeat;), and I need a reflection for that picture, you can see here, what I mean: http://www.imgmodels.com/. Is there a way to do that, using a JS script or css hacks...? Best Regards, ...

Update MySQL Value Through Img Src Variable Including jQuery

Thank-you to all who have helped me over the last few days.. Unfortunately I was working so I couldn't get back to you. I have included some code into what I thought would work, but for some reason the below code will not update in my SQL Database. I will provide the code and it's output if someone could please copy the code and see wh...