Note that there are some explanatory texts on larger screens.

plurals
  1. POget last element id number in JQuery and plus one
    primarykey
    data
    text
    <p>how can i get the last id number of below code dynamically? (in this code = obj_9)</p> <pre><code> &lt;div id="objects"&gt; &lt;div class="obj_item"&gt;&lt;img id="obj_1" class="ui-widget-content" src="elements/abstract_celtic_knot_in_blue_tattoo_design.png" /&gt;&lt;/div&gt; &lt;div class="obj_item"&gt;&lt;img id="obj_2" class="ui-widget-content" src="elements/anchor_tears_the_skin_tatoo_design.png" /&gt;&lt;/div&gt; &lt;div class="obj_item"&gt;&lt;img id="obj_3" class="ui-widget-content" src="elements/armband_tattoo_with_cross_in_the_center_idea.png" /&gt;&lt;/div&gt; &lt;div class="obj_item"&gt;&lt;img id="obj_4" class="ui-widget-content" src="elements/armband_tribal_sign_tattoo_design.png" /&gt;&lt;/div&gt; &lt;div class="obj_item"&gt;&lt;img id="obj_5" class="ui-widget-content" src="elements/bat_covered_by_the_wings_tattoo_design.png" /&gt;&lt;/div&gt; &lt;div class="obj_item"&gt;&lt;img id="obj_6" class="ui-widget-content" src="elements/black_eye_tattoo_idea.png" /&gt;&lt;/div&gt; &lt;div class="obj_item"&gt;&lt;img id="obj_7" class="ui-widget-content" src="elements/black_sketch_of_native_indian_chief_tattoo_design.png" /&gt;&lt;/div&gt; &lt;div class="obj_item"&gt;&lt;img id="obj_8" class="ui-widget-content" src="elements/clown_with_two_knives_tattoo_idea.png" /&gt;&lt;/div&gt; &lt;div class="obj_item"&gt;&lt;img id="obj_9" class="ui-widget-content" src="elements/eagle_is_catching_prey_tattoo_design.png" /&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>and finally convert id to int number and plus it one.</p> <p>thank you</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload