Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by markdolar
at 2024-07-17 21:20:14
Point:500 Replies:9 POST_ID:829015USER_ID:11917
Topic:
JavaScript;;Web Languages/Standards
I have the following function:
function() {
if (settings.onthumbnailclick != null) {
settings.onthumbnailclick($(this).attr('src') + "Selected");
}
});
Which, when run off a web page, prints the name of a file associated with the thumbnail click ("src"). The file is an image file (jpg or png).
What I want to do is display the contents of the file as an image instead of the message. I don't really want to do in the html if I don't have to. I would like the image to overlay on top of the web page, just like the message this function generates does.
Is there a statement I could substitute for
settings.onthumbnailclick($(this).attr('src') + "Selected");
That would display src as an image instead?
Thank you for your time.
function() {
if (settings.onthumbnailclick != null) {
settings.onthumbnailclick($(this).attr('src') + "Selected");
}
});
Which, when run off a web page, prints the name of a file associated with the thumbnail click ("src"). The file is an image file (jpg or png).
What I want to do is display the contents of the file as an image instead of the message. I don't really want to do in the html if I don't have to. I would like the image to overlay on top of the web page, just like the message this function generates does.
Is there a statement I could substitute for
settings.onthumbnailclick($(this).attr('src') + "Selected");
That would display src as an image instead?
Thank you for your time.
Author: markdolar replied at 2024-08-05 17:36:51
To get an "A" - a totally complete and excellent solution:
Show me in the jcarousel code set exactly where and how to call the lightview code. I had to figure that part out myself. Not super tough - the lightview documentation is very helpful.
Not taking away from the quality of the answers, mind you. They were very good. Just setting a higher bar for an "A".
The response you provided, while correct and helpful, I figured out another way before you posted it. However, since it was correct and potentially helpful for someone else (plus, you had no way of knowing I got the answer a hour ahead of your post), I awarded you points as if it was the first I had learned it.
Thanks again.
Mark
Show me in the jcarousel code set exactly where and how to call the lightview code. I had to figure that part out myself. Not super tough - the lightview documentation is very helpful.
Not taking away from the quality of the answers, mind you. They were very good. Just setting a higher bar for an "A".
The response you provided, while correct and helpful, I figured out another way before you posted it. However, since it was correct and potentially helpful for someone else (plus, you had no way of knowing I got the answer a hour ahead of your post), I awarded you points as if it was the first I had learned it.
Thanks again.
Mark
Expert: Big Monty replied at 2024-08-05 07:08:38
just curious, why the grade of only B? what was missing from the answers that would have made them satisfactory?
Author: markdolar replied at 2024-08-05 02:16:11
big Monty was correct a out the cause of the errror. Lightview was a helpful contribution and I was able to successfully integrate jscarousel and lightview. Duncanb7 got points for correctly guessing I was using jcarousel by looking at the error message. Thanks everybody.
Assisted Solution
Expert: Big Monty replied at 2024-07-22 18:47:01
200 points GOOD
looks like the repository is blocking the reference to jquery. try putting a local copy of jquery directly into the repository and reference it from there
Accepted Solution
Author: markdolar replied at 2024-07-22 16:47:50
Duncan - yes you do understand my question and yes, I am using jcarousel. I looked at the blueimp code, but I am moving forward with Lightview/jcarousel integration at the moment. If that doesn't work, I will probably go back to blueimp. Blueimp looks simple, but the interface on jcarousel is better for my application. More shortly.
Assisted Solution
Expert: duncanb7 replied at 2024-07-19 01:06:12
100 points GOOD
Proabably, you are using jsCarousel jquery code
and it will show the file name at alert() message box when you click the image. Anyway, try other alternative that will be faster to get what you need
I find one site with image gallery and it will display the image not file text as you said
before, please view the bottom of the page ,and the all code is free
http://blueimp.github.io/Gallery/
Hope understand your question completely.If not, please point it out
Duncan
and it will show the file name at alert() message box when you click the image. Anyway, try other alternative that will be faster to get what you need
I find one site with image gallery and it will display the image not file text as you said
before, please view the bottom of the page ,and the all code is free
http://blueimp.github.io/Gallery/
Hope understand your question completely.If not, please point it out
Duncan
Author: markdolar replied at 2024-07-18 23:04:00
Thank you for the comments.
I decided to look at the lightview approach, but I ran into some problems.
I downloaded the code from the lightview website, put it in a github repository and cloned it into c9 (c9 is a development environment http://c9.io. The github repository is here:
https://github.com/powerfinger/Lightview
When I run the example, it will display the image, but not the caption text, etc. I run it in mozilla with firebug and I am seeing errors:
Blocked loading mixed active content "http://code.jquery.com/jquery-1.11.0.min.js"
ReferenceError: jQuery is not defined
...function(){return a.each(this.items(),function(a,b){b.stop()}),this},pause:funct...
spinners.min.js (line 9)
ReferenceError: jQuery is not defined
...w.type]){var f=this.options.errors&&this.options.errors.missing_plugin||"";f=f.r...
Their web page looks nice, but the code is somewhat expensive for commercial deployment, but I would consider it if I can get it to run. I posted a message similar to this one on their support forum for assistance.
I decided to look at the lightview approach, but I ran into some problems.
I downloaded the code from the lightview website, put it in a github repository and cloned it into c9 (c9 is a development environment http://c9.io. The github repository is here:
https://github.com/powerfinger/Lightview
When I run the example, it will display the image, but not the caption text, etc. I run it in mozilla with firebug and I am seeing errors:
Blocked loading mixed active content "http://code.jquery.com/jquery-1.11.0.min.js"
ReferenceError: jQuery is not defined
...function(){return a.each(this.items(),function(a,b){b.stop()}),this},pause:funct...
spinners.min.js (line 9)
ReferenceError: jQuery is not defined
...w.type]){var f=this.options.errors&&this.options.errors.missing_plugin||"";f=f.r...
Their web page looks nice, but the code is somewhat expensive for commercial deployment, but I would consider it if I can get it to run. I posted a message similar to this one on their support forum for assistance.
Assisted Solution
Expert: Big Monty replied at 2024-07-18 08:48:34
200 points GOOD
i would look into a modal pop-up for this, instead of re-inventing the wheel. I particular like LightView, easy to set up and configure, and it comes with a few different themes:
http://projects.nickstakenburg.com/lightview
http://projects.nickstakenburg.com/lightview
Expert: duncanb7 replied at 2024-07-17 23:17:33
Could you send us your page to us for review for all including image wrapper ?
Duncan
Duncan