Results 1 to 3 of 3

Thread: How to run this script on several photo posts (Tumblr)?

  1. #1
    Join Date
    Jan 2017

    How to run this script on several photo posts (Tumblr)?

    Hello, i'm new here and a noob when it comes to Javascript

    I have a script that adds an overlay onto an image when clicking on the image itself.

    Now I would like to have this script run on all photo posts over a Tumblr.

    As it is, there is some conflicts and I cannot seem to be running multiple instances on the same page.

    I know that that each post on Tumblr generates a {PostID} and I'm wondering whether this should be used as a target, as a class maybe or data-ID, but i'm not sure how. I read a few things but i'm not sure where to start

    This is the photoblog : https://artfolio-theme.tumblr.com
    and this is an extract of the source : http://guillaumeb.com/demo/source.txt

    When clicking on the first image it works fine. But the second image creates the conflict.

    Any ideas ?

    Thank you very much

  2. #2
    Join Date
    Mar 2007
    1. JQuery questions goes in the JavaScript Frameworks forum
    2. please post the script portion you are having problems with wrapped in BBCode tags
    3. See my signature for a hint on both issues...
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  3. #3
    Join Date
    Jan 2017
    ^^that's not a jQuery question

    I made a JSFiddle to illustrate the problem
    I tried to clean my code with HTML version of :
    A photo post
    A text post
    Another photo post

    There is a conflict when trying to click on the second image

    note that the script is actually added below the HTML as it would not work otherwise

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center