I'd like to add <option> in each <select> depending
on the visible items. I mean: If I have categories: 1 and 2 and
provinces: 1 I would like to offer just those options in
<option> tags. Would you please give me a clue? (note I'm
using 'data-*' to determinate which element belong to each
category or province.... Jake!!! ;)
I'm stuck with this. I'd like to give the user the chance
to think if he is completely sure of delete his account before to do
it. So, I put an <a> tag which calls the following script:
$(".editAccount
a").on("click", function(e){
e.preventDefault();
var
curr = $(".editAccount").html();
var
r = $(".editAccount").html("<h3>ARE YOU
COMPLETELY SURE OF DELETE YOUR
ACCOUNT..</h3><div><a
class='yes'>YES</a><a class='no'>NO</a></div>");
});
My idea is if he clicks on "NO" he "goes
back" to the original html content (in the curr var) and if
he clicks on "YES" he continuous his delete
account's process.
The problem is: I'm afraid I'm not doing well, because
curr is a local var and I don't know how to solve this
problem... Would you please help me?
I'm having a strange delay between the input content and the
val value... I mean: the val value is always one step behind of the
real content of the input box... I don't know what am I doing
wrong... Would you please give me a clue?
THANK YOU!!!
$(document).on("keydown",
"aside form input[name='search-shop']",
function(){
I'm trying to modify this
tutorial: http://tutorialzine.com/2010/03/sponsor-wall-flip-jquery-css/
in order to add a button to flip the boxes and another to close them.
I'm stuck because after adding the content with .html() the
'.close' button doesn't work and I don't really
understant why... Would you please give me a clue?
THANK YOU!!!
$(document).ready(function(){
$('.open').on("click",function(){
var
elem = $(this).closest(".sponsorFlip");
if(elem.data('flipped'))
{
elem.revertFlip();
elem.data('flipped',false)
}
else
{
elem.flip({
direction:'rl',
speed: 250,
onBefore: function(){
//PROBLEM 1: THE <p
class="close">CLOSE</p> INSIDE .sponsorData
DOESN'T
WORK AFTER .html() INSERT
elem.html(elem.siblings('.sponsorData').html());
}
});
elem.data('flipped',true);
// this code is to revert all the flipped boxes
$(".sponsorFlip").not(elem).each(function(){
if($(this).data("flipped")){
// PROBLEM
2: I HAVE TO MODIFY THE TRIGGER IN ORDER TO EXECUTE THE .close
CLICK EVENT
$(this).trigger("click",[true]);
}
});
}
});
$(".close").on("click",function(){
alert("I'd
like to revert the flipped box when I'm here. I know I
should remove the if/else from .open click event");
I'm trying to do an easy filter script to show the
elements I want to see depending the option I've chosen. I
don't want to use an external script. I'd like to do it by myself.
I'm having problems with css styling. I'd like to
set different style for the first word of a li element. The problem
is, I can't add a tag to the html because is a prestashop site....
And, we are talking about the menu... (dynamic). So, my option is
jQuery. I need something like :first-word but I don't understand
what I've founded in the Internet. So, could it be possible
something like:
var
Words = $('nav li').text();
var FirstWord = Words.split(' '); //FirstWord[0]
// and then I'd like to add a span to wrap the word
I'll try to explain what I want to do. I have multiple
images to select and I'd like to limit the user selecting an image
or images with the total with lower than 990px. I have the with
information into the 'alt' of each images. It would be
something like this:
- if you've chosen one image of 990px you can't select more images
- if you've chosen one image of 728px you can select another of
250px i.e
I'm doing a form which contains a gallery with PHP+MySQL.
I'd like to add the possibility to upload images using jQuery in
case of the image I'd like to use is not in the gallery. The
problem is, $_FILES doesn't send through $.post.... I was reading
and, as I understood, this is not possible.
Another option would be open a pop-up window to upload the file.
But in this case, when I go back to the form, the pictures must be
updated with no reload it (because if I reload I miss all the
information I have typed before). How could I do it?
In definitive, I'd like to add something like this:
$('ul').append('<li><img src...
/><span>NAME</span></li>'); to the main page
form, when the popup window image is recorded.
I don't know why the script doesn't hide the previous
current section... I can't use the .gallery-item directly because
I have two like this and if I use the class the changes applies in
both of them. Does anybody know what could be happen?
I'm working on a control panel form. One of those fields is a
selection of images from a gallery. I'd like to open the gallery
in another page and do everything I want (upload, edit, delete images)
and then, select the images I'd like to include in my post. I put
all the selected files into a jQuery array called
'selectedItems'. Everything is fine here, the problem is, I
don't know how to pass that array to the parent page... I mean, I
have the post data into the page A (title, content, etc), but the
images loading from the page B (gallery) and when I finished my
selection, I'd like to close the B window and has the values into
the A page... How could I do that? I used to call functions with
$.post but in this case, the user has to interact with the gallery....