- Screen name: neilhkessler
neilhkessler's Profile
4 Posts
5 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
- 07-Nov-2018 09:04 AM
- Forum: Using jQuery
I am using jquery modal plugin to raise modal forms on a page. If I make the modal form visible on page load (as a test, and not yet raised by the plugin), the browser's autofill functionality works fine in the input fields. But, when I raise the modal form using jquerymodal (it detaches then appends the modal element to the body) the autofill no longer works. Any idea as to why?I thought it might have to do with the fact that the form code is inside <form> tags on the page, but when the jquery modal plugin operates on the element, it appends it outside those tags. I thought this might cause issues with the browser understanding that they are input fields. But, removing the form tags entirely made no difference. I can't even get autocomplete to work on this element when it is raised as a modal window.Any help would be appreciated!- New to jquery and using the overlay tools in jquery-1.2.7.tools.min.js. I have several div's set up as overlays on an 'img' and some 'a' tags.
<img src="/image/test.png" rel="#1485">
<div id="1485" class="simple_overlay">
<a rel="1486">1</a>
<a rel="1487">2</a>
<a rel="1488">3</a>
<div id="1486" class="simple_overlay">
<a rel="1486">1</a>
<a rel="1487">2</a>
<a rel="1488">3</a>
<div id="1487" class="simple_overlay">
<a rel="1486">1</a>
<a rel="1487">2</a>
<a rel="1488">3</a>
When I click on one of the 'a' links, I want the overlay div matching its id to be shown, and the others to be hidden. But, in using jquery code like this:
<script>
$(document).ready(function () {
$('img[rel]').overlay({
oneInstance: false
});
$('a[rel]').overlay({
oneInstance: false,
onLoad: function (event) {
$('.simple_overlay').not($(this)).hide();
}
});
});
</script>
or in using this:
$(this).siblings().hide()
the "this" designation does not do what I want. Essentially, all divs with class .simple_overlay are hidden on the hide() call. I want the div with the clicked rel id to be shown, and the others hidden, but it seems I'm mistaking what "this" is...Can anyone tell me how to do this?- 27-Mar-2013 10:49 AM
- Forum: Using jQuery Plugins
Invoking an overlay within a scrollable area. Using tinyscrollbar plugin ( http://www.baijs.nl/tinyscrollbar/ ) and, when the overlay is invoked, I want to set the scroll option in tinyscrollbar to false. This is the script in the header:
- <script type="text/javascript">
- $(document).ready(function () {
- $('#scrollbar2').tinyscrollbar({ scroll: true });
- });
- </script>
This is the overlay script:
- $(document).ready(function () {
- $("img[rel]").overlay({
- onBeforeLoad: function (event) {
- $('#scrollbar2').tinyscrollbar({ scroll: false });
- },
- onClose: function (event) {
- $('#scrollbar2').tinyscrollbar({ scroll: true});
- }
- });
- });
I've seen posts about similar things, and tried to make them work for my case, but am clearly doing something wrong.
I have a page where an overlay is invoked by clicking on an image. In the code behind, some links are added to the overlay that's created such that if you click them, I want another overlay to be created and the first one to disappear. The layout of the first and second overlays are the same, though the "child" overlays don't have further "links" embedded.
What's happening is that the first overlay comes up fine, but when I click one of the links to bring up the second overlay, the first overlay disappears, but the second isn't invoked and I'm back to my base page. Then, if I click the image again to bring up the first overlay, both overlays appear, the second one tiled in front of the first. What am I doing wrong?
Here is a simplified form of the resultant html:<img rel="#1208" src="/images/testsmall.png" />
<div class="simple_overlay" id="1208">
<img src="/images/testlarge.png" />
<a rel="#1208_a>link a</a>
<div class="simple_overlay" id="1208_a">
<img src="/images/testlarge_a.png" />
</div>
<a rel="#1208_b>link b</a>
<div class="simple_overlay" id="1208_b">
<img src="/images/testlarge_b.png" />
</div>
</div>
<script>
$(document).ready(function () {
$("img[rel]").overlay({
onBeforeLoad: function (event) {
$('.scrollbar').hide("fast");
$('.thumb').hide("fast"); },
onClose: function (event) {
$('.scrollbar').show();
$('.thumb').show();}
});
$("a[rel]").overlay({
onBeforeLoad: function (event) {
$('img[rel]').overlay().close(); // close the first overlay
$('.scrollbar').hide("fast");
$('.thumb').hide("fast"); },
onClose: function (event) {
$('.scrollbar').show();
$('.thumb').show();
}
});
});
</script>
Any help would be greatly appreciated.- «Prev
- Next »
Moderate user : neilhkessler
© 2013 jQuery Foundation
Sponsored by and others.

